diff --git a/package.json b/package.json index 5b127fa..fb5f33d 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "ghooks": "1.3.2", "html-webpack-plugin": "2.22.0", "http-server": "0.9.0", + "inline-manifest-webpack-plugin": "3.0.1", "karma": "1.1.2", "karma-chai": "0.1.0", "karma-chrome-launcher": "1.0.1", diff --git a/src/index.html b/src/index.html index a114f38..0a2057c 100755 --- a/src/index.html +++ b/src/index.html @@ -3,6 +3,7 @@ VanillaJS • TodoMVC + <%=htmlWebpackPlugin.files.webpackManifest%>
diff --git a/webpack.config.babel.js b/webpack.config.babel.js index b5098ae..e454354 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -3,6 +3,7 @@ const {resolve} = require('path') const webpack = require('webpack') const ProgressBarPlugin = require('progress-bar-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') +const InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin') const webpackValidator = require('webpack-validator') const {getIfUtils, removeEmpty} = require('webpack-config-utils') @@ -28,8 +29,9 @@ module.exports = env => { }, plugins: removeEmpty([ new ProgressBarPlugin(), + ifProd(new InlineManifestWebpackPlugin()), ifProd(new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', + names: ['vendor', 'manifest'], })), new HtmlWebpackPlugin({ template: './index.html',