Skip to content

Commit eab24b9

Browse files
Vincenzo Chianeserandycoulman
Vincenzo Chianese
authored andcommitted
Update webpack prod config (facebook#1181)
1 parent 1f6319b commit eab24b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-scripts/config/webpack.config.prod.js

+4
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ module.exports = {
8181
// We don't currently advertise code splitting but Webpack supports it.
8282
filename: 'static/js/[name].[chunkhash:8].js',
8383
chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
84+
// Given Webpack supports codesplit and production bundles are using
85+
// subresource integrity, it's important to make sure the attribute
86+
// set on async-loaded chunks is set to anonymous.
87+
crossOriginLoading: 'anonymous',
8488
// We inferred the "public path" (such as / or /my-project) from homepage.
8589
publicPath: publicPath
8690
},

0 commit comments

Comments
 (0)