File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 44 < meta charset ="UTF-8 " />
55 < meta content ="width=device-width, initial-scale=1.0 " name ="viewport " />
66 < title > Waku Dogfooding - Refactored</ title >
7- < link rel ="apple-touch-icon " href ="./ favicon.png " />
8- < link rel ="manifest " href ="./ manifest.json " />
9- < link rel ="icon " href ="./ favicon.ico " />
10- < link rel ="stylesheet " href ="./ style.css " />
7+ < link rel ="apple-touch-icon " href ="<%= htmlWebpackPlugin.options.publicPath %> favicon.png " />
8+ < link rel ="manifest " href ="<%= htmlWebpackPlugin.options.publicPath %> manifest.json " />
9+ < link rel ="icon " href ="<%= htmlWebpackPlugin.options.publicPath %> favicon.ico " />
10+ < link rel ="stylesheet " href ="<%= htmlWebpackPlugin.options.publicPath %> style.css " />
1111</ head >
1212< body >
1313 < div class ="app-container ">
@@ -57,6 +57,5 @@ <h2>Message Log</h2>
5757 < p > Waku Dogfooding App - Modern UI</ p >
5858 </ footer >
5959 </ div >
60- < script src ="./index.js "> </ script >
6160</ body >
6261</ html >
Original file line number Diff line number Diff line change 1818 "@libp2p/interface" : " ^2.1.3" ,
1919 "@types/node" : " ^20.12.11" ,
2020 "copy-webpack-plugin" : " ^11.0.0" ,
21- "html-webpack-plugin" : " ^5.6.3" ,
2221 "eslint" : " ^8" ,
2322 "eslint-config-next" : " 13.5.6" ,
23+ "html-webpack-plugin" : " ^5.6.3" ,
2424 "ts-loader" : " ^9.5.1" ,
2525 "typescript" : " ^5.4.5" ,
2626 "webpack" : " ^5.74.0" ,
Original file line number Diff line number Diff line change 11const CopyWebpackPlugin = require ( "copy-webpack-plugin" ) ;
2+ const HtmlWebpackPlugin = require ( "html-webpack-plugin" ) ;
23const path = require ( "path" ) ;
34
45const isProduction = process . env . NODE_ENV === 'production' ;
@@ -32,9 +33,18 @@ module.exports = {
3233 global : false
3334 } ,
3435 plugins : [
36+ new HtmlWebpackPlugin ( {
37+ template : "index.html" ,
38+ filename : "index.html" ,
39+ inject : 'head' ,
40+ scriptLoading : 'defer' ,
41+ publicPath : publicPath ,
42+ templateParameters : {
43+ removeScript : true
44+ }
45+ } ) ,
3546 new CopyWebpackPlugin ( {
3647 patterns : [
37- { from : "index.html" , to : "index.html" } ,
3848 { from : "public/style.css" , to : "style.css" } ,
3949 { from : "manifest.json" , to : "manifest.json" } ,
4050 { from : "favicon.ico" , to : "favicon.ico" } ,
You can’t perform that action at this time.
0 commit comments