From 13c7d57ef45c588b1cd4d7b026bb4cc11963d371 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 29 Jul 2016 11:21:10 -0600 Subject: [PATCH] =?UTF-8?q?longterm=20hashing=20FTW=20=F0=9F=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/index.html | 1 + webpack.config.babel.js | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) 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',