-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
57 lines (55 loc) · 1.44 KB
/
Copy pathwebpack.config.js
File metadata and controls
57 lines (55 loc) · 1.44 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
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
mode: "production",
entry: {
main: "./src/js/index.js",
animations: "./src/js/animations-entry.js",
draw: "./src/js/draw-entry.js",
pong: "./src/js/pong-entry.js",
breakout: "./src/js/breakout-entry.js",
tetris: "./src/js/tetris-entry.js",
meteors: "./src/js/meteors-entry.js"
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/html/index.html",
filename: "index.html",
chunks: ["main"]
}),
new HtmlWebpackPlugin({
template: "./src/html/animations.html",
filename: "animations.html",
chunks: ["animations"]
}),
new HtmlWebpackPlugin({
template: "./src/html/draw.html",
filename: "draw.html",
chunks: ["draw"]
}),
new HtmlWebpackPlugin({
template: "./src/html/pong.html",
filename: "pong.html",
chunks: ["pong"]
}),
new HtmlWebpackPlugin({
template: "./src/html/breakout.html",
filename: "breakout.html",
chunks: ["breakout"]
}),
new HtmlWebpackPlugin({
template: "./src/html/tetris.html",
filename: "tetris.html",
chunks: ["tetris"]
}),
new HtmlWebpackPlugin({
template: "./src/html/meteors.html",
filename: "meteors.html",
chunks: ["meteors"]
})
],
};