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

@@ -1,17 +1,7 @@
const path = require('path');
const config = require('../../../webpack/config.js');
const webpack = require('webpack');
module.exports = {
entry: {
'service-worker': './app/service-worker.js'
},
output: {
path: path.resolve(`.sapper`),
filename: '[name].js',
chunkFilename: '[name].[id].[hash].js'
},
plugins: [
!config.dev && new webpack.optimize.ModuleConcatenationPlugin()
].filter(Boolean)
entry: config.serviceworker.entry(),
output: config.serviceworker.output(),
mode: process.env.NODE_ENV
};