-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
62 lines (52 loc) · 1.93 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
var ZipPlugin = require('zip-webpack-plugin');
const path = require('path');
module.exports = {
// ...
output: {
path: path.join(__dirname, 'dist/apps/bde'),
filename: 'bundle.js'
},
plugins: [
new ZipPlugin({
// OPTIONAL: defaults to the Webpack output path (above)
// can be relative (to Webpack output path) or absolute
path: 'zip',
// OPTIONAL: defaults to the Webpack output filename (above) or,
// if not present, the basename of the path
filename: 'bde.zip',
// OPTIONAL: defaults to 'zip'
// the file extension to use instead of 'zip'
//extension: 'ext',
// OPTIONAL: defaults to the empty string
// the prefix for the files included in the zip file
//pathPrefix: 'relative/path',
// OPTIONAL: defaults to the identity function
// a function mapping asset paths to new paths
// pathMapper: function(assetPath) {
// // put all pngs in an `images` subdir
// if (assetPath.endsWith('.png'))
// return path.join(path.dirname(assetPath), 'images', path.basename(assetPath));
// return assetPath;
// },
// OPTIONAL: defaults to including everything
// can be a string, a RegExp, or an array of strings and RegExps
//include: [/\.js$/],
// OPTIONAL: defaults to excluding nothing
// can be a string, a RegExp, or an array of strings and RegExps
// if a file matches both include and exclude, exclude takes precedence
//exclude: [/\.png$/, /\.html$/],
// yazl Options
// OPTIONAL: see https://github.com/thejoshwolfe/yazl#addfilerealpath-metadatapath-options
fileOptions: {
mtime: new Date(),
mode: 0o100664,
compress: true,
forceZip64Format: false,
},
// OPTIONAL: see https://github.com/thejoshwolfe/yazl#endoptions-finalsizecallback
zipOptions: {
forceZip64Format: false,
},
})
]
};