Skip to content

Commit

Permalink
Merge pull request #1 from facebook/master
Browse files Browse the repository at this point in the history
set output.globalObject to 'this' (facebook#7742)
  • Loading branch information
hchiam committed Sep 27, 2019
2 parents 0d1775e + 42ee721 commit e068337
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-scripts/config/webpack.config.js
Expand Up @@ -202,6 +202,9 @@ module.exports = function(webpackEnv) {
// Prevents conflicts when multiple Webpack runtimes (from different apps)
// are used on the same page.
jsonpFunction: `webpackJsonp${appPackageJson.name}`,
// this defaults to 'window', but by setting it to 'this' then
// module chunks which are built will work in web workers as well.
globalObject: 'this',
},
optimization: {
minimize: isEnvProduction,
Expand Down

0 comments on commit e068337

Please sign in to comment.