react-config-tut: added HtmlWebpackPlugin plugin for deployment
This commit is contained in:
parent
a5b0d54cee
commit
3616faa187
|
@ -5,6 +5,5 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="./dist/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
var path = require('path');
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
//tell Webpack to generate src maps
|
||||
|
@ -40,4 +41,9 @@ module.exports = {
|
|||
},
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: path.resolve('./index.html'),
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue