-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
35 lines (33 loc) · 897 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const webpack = require('webpack'); //to access built-in plugins
const path = require('path');
var SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
module.exports = {
entry: {
website: "./ui/src/#routes.js",
dashboard: "./ui/src/dashboard/#routes.js",
admin: "./ui/src/admin/#routes.js",
},
output: {
filename: "[name].bundle.js",
path: path.resolve(__dirname, "./ui/assets/bin")
},
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
}]
},
plugins: [
new SWPrecacheWebpackPlugin(
{
cacheId: 'passwordDelayV100',
dontCacheBustUrlsMatching: /\.\w{8}\./,
filename: 'service-worker.js',
minify: true,
navigateFallback: '/',
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
}
),
],
}