-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (40 loc) · 1.37 KB
/
webpack.config.js
File metadata and controls
41 lines (40 loc) · 1.37 KB
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
const path = require("path");
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
module.exports = {
mode: "production",
entry: {
control_bar: "./scripts/control_bar.js",
file_resume: "./scripts/file_resume.js",
page_browser: "./tools/page_browser.js",
show_all_good_word_suggestions: "./tools/project_manager/show_all_good_word_suggestions.js",
show_word_context: "./tools/project_manager/show_word_context.js",
proof_image: "./tools/proofers/proof_image.js",
previewControl: "./tools/proofers/previewControl.js",
},
output: {
filename: "[name].bundle.[contenthash].js",
path: path.resolve(__dirname, "dist"),
clean: true, // Clean the output directory before emit.
},
optimization: {
moduleIds: "deterministic",
runtimeChunk: "single",
splitChunks: {
// these force vendors into its own file regardless of space saved
minSize: 1,
minSizeReduction: 1,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: "vendors",
chunks: "all",
},
},
},
},
plugins: [new WebpackManifestPlugin()],
target: "browserslist",
watchOptions: {
ignored: /node_modules/,
},
};