Commit 6cc901b9 authored by Max's avatar Max Committed by Christopher Chedeau
Browse files

Implement index.html to src folder

parent 86bdbf96
No related merge requests found
Showing with 19 additions and 2 deletions
+19 -2
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My React App</title>
</head>
<body>
<!-- A lot of magic happens in this file. HtmlWebpackPlugin automatically includes all assets (e.g. bundle.js) with the correct HTML tags, which is why they are missing in this HTML file. -->
</body>
</html>
......@@ -74,7 +74,10 @@ module.exports = {
},
plugins: [
// TODO: infer from package.json?
new HtmlWebpackPlugin({ title: 'My React Project' }),
new HtmlWebpackPlugin({
inject: true,
template: path.resolve(__dirname, relative, 'src/index.html'),
}),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' })
]
};
......@@ -74,7 +74,10 @@ module.exports = {
},
plugins: [
// TODO: infer from package.json?
new HtmlWebpackPlugin({ title: 'My React Project' }),
new HtmlWebpackPlugin({
inject: true,
template: path.resolve(__dirname, relative, 'src/index.html'),
}),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ compressor: { warnings: false } })
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment