Last active
February 12, 2018 17:24
-
-
Save bakoushin/376f2c017c1cb7038189783611ee463f to your computer and use it in GitHub Desktop.
Service Worker webpack config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const BabiliPlugin = require('babili-webpack-plugin'); | |
module.exports { | |
entry: { | |
'bundle.min': './src/index.js', | |
'sw': './src/sw.js' | |
}, | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: '[name].js' | |
}, | |
module: { | |
rules: [ | |
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" } | |
] | |
}, | |
plugins: [ | |
new BabiliPlugin({}, { | |
test: /\.js$/, | |
exclude: /node_modules/, | |
comments: false, | |
babel: require("babel-core"), | |
babili: require("babel-preset-babili") | |
}) | |
], | |
watch: true, | |
watchOptions: { | |
aggregateTimeout: 300, | |
poll: 1000, | |
ignored: /node_modules/ | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment