diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index c2f066e5d6ad49fb3e936bf4b64f306996443042..71509658eb786f68a26caf02923664923f9aec64 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 },