send/webpackSw.config.js
2018-07-06 15:49:50 -07:00

30 lines
499 B
JavaScript

const path = require('path');
const regularJSOptions = {
babelrc: false,
presets: [['env'], 'stage-2'],
plugins: ['transform-runtime']
};
const entry = {
serviceWorker: ['./app/serviceWorker.js']
};
module.exports = {
entry,
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
module: {
rules: [
{
loader: 'babel-loader',
exclude: /node_modules/,
options: regularJSOptions
}
]
}
};