Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var ManifestPlugin = require('webpack-manifest-plugin');
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
var SubresourceIntegrityPlugin = require('webpack-subresource-integrity');
var url = require('url');
var paths = require('./paths');
var getClientEnvironment = require('./env');
Expand Down Expand Up @@ -259,6 +260,10 @@ module.exports = {
// having to parse `index.html`.
new ManifestPlugin({
fileName: 'asset-manifest.json'
}),
// Generate and inject subresources hashes in the final `index.html`.
new SubresourceIntegrityPlugin({
hashFuncNames: ['sha256', 'sha384']
})
],
// Some libraries import Node modules but don't use them in the browser.
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"webpack": "1.13.2",
"webpack-dev-server": "1.16.2",
"webpack-manifest-plugin": "1.1.0",
"webpack-subresource-integrity": "0.7.0",
"whatwg-fetch": "1.0.0"
},
"devDependencies": {
Expand Down