send/webpackSw.config.js

40 lines
827 B
JavaScript
Raw Normal View History

2018-07-05 19:40:49 +00:00
const path = require('path');
const webpack = require('webpack');
const regularJSOptions = {
babelrc: false,
presets: [['env', { modules: false }], 'stage-2'],
// yo-yoify converts html template strings to direct dom api calls
plugins: [
"transform-runtime", {
//"polyfill": false,
//"regenerator": true
}
]
};
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/,
include: [
path.resolve(__dirname, 'app'),
path.resolve(__dirname, 'node_modules/buffer')
],
options: regularJSOptions
}
]
}
};