fox-send/webpackSw.config.js

35 lines
515 B
JavaScript
Raw Normal View History

2018-07-05 19:40:49 +00:00
const path = require('path');
2018-07-10 00:00:19 +00:00
/*
2018-07-05 19:40:49 +00:00
const regularJSOptions = {
babelrc: false,
2018-07-06 22:49:50 +00:00
presets: [['env'], 'stage-2'],
plugins: ['transform-runtime']
2018-07-05 19:40:49 +00:00
};
2018-07-10 00:00:19 +00:00
*/
2018-07-05 19:40:49 +00:00
const entry = {
serviceWorker: ['./app/serviceWorker.js']
};
module.exports = {
entry,
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
2018-07-06 22:49:50 +00:00
2018-07-10 00:00:19 +00:00
/*
2018-07-05 19:40:49 +00:00
module: {
rules: [
{
loader: 'babel-loader',
2018-07-06 22:49:50 +00:00
exclude: /node_modules/,
2018-07-05 19:40:49 +00:00
options: regularJSOptions
}
]
}
2018-07-10 00:00:19 +00:00
*/
2018-07-06 22:49:50 +00:00
};