-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.dist.js
59 lines (53 loc) · 1.65 KB
/
webpack.config.dist.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
var webpack = require('webpack');
var AppCachePlugin = require('appcache-webpack-plugin');
module.exports = {
context: __dirname + "/src/js",
entry: ["./App.js"],
output: {
path: __dirname + "/dist",
filename: "bundle.js"
},
node: {
console: true,
fs: 'empty',
net: 'empty',
tls: 'empty'
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': '"development"',
'API_URL': '"https://local.tryshuttle.com"'
}
}),
new AppCachePlugin({
cache: ['bundle.js', 'index.html', 'quill.core.css', 'quill.snow.css','android-icon-144x144.png',
'android-icon-192x192.png','android-icon-36x36.png','android-icon-48x48.png','android-icon-72x72.png',
'android-icon-96x96.png','apple-icon-114x114.png','apple-icon-120x120.png','apple-icon-144x144.png',
'apple-icon-152x152.png','apple-icon-180x180.png','apple-icon-57x57.png','apple-icon-60x60.png',
'apple-icon-72x72.png','apple-icon-76x76.png','apple-icon-precomposed.png','apple-icon.png',
'browserconfig.xml','bundle.js','favicon-16x16.png','favicon-32x32.png','favicon-96x96.png',
'favicon.ico','index.html','manifest.json','ms-icon-144x144.png','ms-icon-150x150.png',
'ms-icon-310x310.png','ms-icon-70x70.png'],
network: ['*']
})
],
module: {
rules: [
{
test: /\.js?$/,
exclude: /(node_modules|bower_components)/,
use: [{
loader: 'babel-loader'
}]
},
{
test: /\.json$/,
use: [{
loader: 'json-loader'
}]
}
]
}
}