sw
This commit is contained in:
parent
38ef52d3ba
commit
62ed0a411f
16 changed files with 245 additions and 133 deletions
40
webpackSw.config.js
Normal file
40
webpackSw.config.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
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
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue