File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
6+ < meta name ="referrer " content ="origin " />
7+ < meta name ="description " content ="Page description " />
8+ < title > Boilerplate!</ title >
9+ </ head >
10+ < body >
11+ </ body >
12+ </ html >
13+
Original file line number Diff line number Diff line change 11// webpack.config.js
22const path = require ( "path" ) ;
3+ const HtmlWebpackPlugin = require ( "html-webpack-plugin" ) ;
34
45// We'll refer to our source and dist paths frequently, so let's store them here
56const PATH_SOURCE = path . join ( __dirname , "./src" ) ;
@@ -84,5 +85,13 @@ module.exports = (env) => {
8485 } ,
8586 ] ,
8687 } ,
88+ plugins : [
89+ // This plugin will generate an HTML5 file that imports all our Webpack
90+ // bundles using <script> tags. The file will be placed in `output.path`.
91+ // https://github.com/jantimon/html-webpack-plugin
92+ new HtmlWebpackPlugin ( {
93+ template : path . join ( PATH_SOURCE , "./index.html" ) ,
94+ } ) ,
95+ ] ,
8796 } ;
8897} ;
You can’t perform that action at this time.
0 commit comments