This repository was archived by the owner on Jan 24, 2025. It is now read-only.
forked from muziejus/torn-apart
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.babel.js
More file actions
74 lines (71 loc) · 1.6 KB
/
webpack.config.babel.js
File metadata and controls
74 lines (71 loc) · 1.6 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import { resolve } from "path";
import CleanWebpackPlugin from "clean-webpack-plugin";
// import CompressionPlugin from "compression-webpack-plugin";
const context = resolve(__dirname, "src");
const out = resolve(__dirname, "docs", "assets", "js");
export default {
mode: "development",
context,
entry: {
i18n: "./i18n.js",
allies: "./allies.js",
texturesV1: "./textures-v1.js",
visualizationsV1: "./visualizations-v1.js",
indexV1: "./index-v1.js",
texturesV2: "./textures-v2.js",
visualizationsV2: "./visualizations-v2.js",
indexV2: "./index-v2.js",
reflections: "./reflections.js"
},
output: {
filename: "[name].bundle.js",
// chunkFilename: "[name].bundle.js",
path: out,
libraryTarget: "umd",
library: "tornApart",
publicPath: "/torn-apart/assets/js/"
},
// optimization: {
// splitChunks: {
// chunks: "all"
// }
// },
// optimization: {
// // chunks: "all"
// splitChunks: {
// cacheGroups: {
// default: false,
// vendors: false,
// vendor: {
// name: "vendor",
// chunks: "all",
// test: /node_modules/
// }
// }
// }
// },
externals: {
jquery: "jQuery",
leaflet: "L"
},
plugins: [
new CleanWebpackPlugin([out]),
// new CompressionPlugin({
// cache: true,
// test: /\.js/,
// }),
],
module: {
rules: [
{
test: /\.csv$/,
loader: "csv-loader",
options: {
dynamicTyping: true,
header: true,
skipEmptyLines: true
}
}
]
}
};