Debugging

This commit is contained in:
Jori Lallo 2016-05-22 22:56:26 -07:00
parent fd79d11479
commit 77b5be64e6
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,8 @@ const router = new Router();
// }
// });
console.log(process.env.NODE_ENV);
if (process.env.NODE_ENV === 'production') {
router.get('/service-worker.js', async (ctx) => {
ctx.set('Content-Type', 'application/javascript');
@ -25,6 +27,7 @@ if (process.env.NODE_ENV === 'production') {
});
router.get('/static/*', async (ctx) => {
console.log(path.join(__dirname, '../dist/', ctx.path.substring(8)));
const stats = await sendfile(ctx, path.join(__dirname, '../dist/', ctx.path.substring(8)));
});
}

View File

@ -11,7 +11,7 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, {
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.[hash].js',
filename: 'bundle.js',
publicPath: '/static/'
},
});