Skip to content

Commit 2061540

Browse files
committed
Ensure that index.html is bundled into dist
This is necessary for our "Production and Deployment" chapter of the book.
1 parent 7dcd3fe commit 2061540

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"hello-wasm-pack": "^0.1.0",
3131
"webpack": "^4.16.3",
3232
"webpack-cli": "^3.1.0",
33-
"webpack-dev-server": "^3.1.5"
33+
"webpack-dev-server": "^3.1.5",
34+
"copy-webpack-plugin": "^4.5.2"
3435
}
3536
}

Diff for: webpack.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const CopyWebpackPlugin = require("copy-webpack-plugin");
12
const path = require('path');
23

34
module.exports = {
@@ -7,4 +8,7 @@ module.exports = {
78
filename: "bootstrap.js",
89
},
910
mode: "development",
11+
plugins: [
12+
new CopyWebpackPlugin(['index.html'])
13+
],
1014
};

0 commit comments

Comments
 (0)