Skip to content

Commit 7445cbf

Browse files
author
sanex3339
committed
Fixed js bundle path
1 parent e0088d4 commit 7445cbf

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

templates/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,5 +618,9 @@ <h3 class="ui header">Support project:</h3>
618618

619619
</div>
620620

621+
<% if(htmlWebpackPlugin.files.chunks.bundle) { %>
622+
<script src="/static/dist/<%= htmlWebpackPlugin.files.chunks.bundle.entry %>"></script>
623+
<% } %>
624+
621625
</body>
622626
</html>

webpack.conf.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
55

66
module.exports = {
77
context: __dirname,
8-
entry: "./App/index.js",
8+
entry: {
9+
"bundle": "./App/index.js"
10+
},
911
output: {
1012
path: __dirname + "/dist",
1113
filename: "bundle.js"
@@ -37,6 +39,7 @@ module.exports = {
3739
},
3840
plugins: [
3941
new HtmlWebpackPlugin({
42+
inject: false,
4043
template: './templates/index.html',
4144
hash: true
4245
}),

0 commit comments

Comments
 (0)