mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-15 03:24:48 +00:00
add service worker config
This commit is contained in:
17
webpack/service-worker.config.js
Normal file
17
webpack/service-worker.config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const path = require('path');
|
||||
const config = require('sapper/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)
|
||||
};
|
||||
Reference in New Issue
Block a user