From 96cae3a24c2ba97c6f5caeb4aa9bc9650cbe703d Mon Sep 17 00:00:00 2001 From: Vincenzo Chianese Date: Tue, 6 Dec 2016 20:48:22 +0100 Subject: [PATCH] Update webpack prod config --- packages/react-scripts/config/webpack.config.prod.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index c2f066e5d6a..71509658eb7 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -81,6 +81,10 @@ module.exports = { // We don't currently advertise code splitting but Webpack supports it. filename: 'static/js/[name].[chunkhash:8].js', chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js', + // Given Webpack supports codesplit and production bundles are using + // subresource integrity, it's important to make sure the attribute + // set on async-loaded chunks is set to anonymous. + crossOriginLoading: 'anonymous', // We inferred the "public path" (such as / or /my-project) from homepage. publicPath: publicPath },