Commit 4fe3544f authored by Dan Abramov's avatar Dan Abramov Committed by Christopher Chedeau
Browse files

Tweak HTML generation

parent 9a988516
Showing with 23 additions and 4 deletions
+23 -4
......@@ -3,9 +3,18 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My React App</title>
<title>My First 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. -->
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` in this folder.
To create a production bundle, use `npm run build`.
-->
</body>
</html>
......@@ -73,7 +73,6 @@ module.exports = {
return [autoprefixer];
},
plugins: [
// TODO: infer from package.json?
new HtmlWebpackPlugin({
inject: true,
template: path.resolve(__dirname, relative, 'index.html'),
......
......@@ -73,10 +73,21 @@ module.exports = {
return [autoprefixer];
},
plugins: [
// TODO: infer from package.json?
new HtmlWebpackPlugin({
inject: true,
template: path.resolve(__dirname, relative, 'index.html'),
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true
}
}),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
new webpack.optimize.OccurrenceOrderPlugin(),
......
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