update webpack/config

This commit is contained in:
Rich Harris
2018-03-04 12:35:13 -05:00
committed by GitHub
parent bdb9d49187
commit 0165c14fd9
7 changed files with 39 additions and 42 deletions

View File

@@ -6,12 +6,7 @@ export default {
client: {
entry: () => {
return {
main: [
'./app/client.js',
// workaround for https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/456
'style-loader/lib/addStyles',
'css-loader/lib/css-base'
]
main: './app/client.js'
};
},
@@ -34,11 +29,27 @@ export default {
output: () => {
return {
path: `${dest()}`,
path: dest(),
filename: '[name].js',
chunkFilename: '[hash]/[name].[id].js',
libraryTarget: 'commonjs2'
};
}
},
serviceworker: {
entry: () => {
return {
'service-worker': './app/service-worker.js'
};
},
output: () => {
return {
path: dest(),
filename: '[name].js',
chunkFilename: '[name].[id].[hash].js'
}
}
}
};
};