Skip to content

Commit

Permalink
Fix workers on dev from HMR idiocy.
Browse files Browse the repository at this point in the history
  • Loading branch information
wbobeirne committed Apr 6, 2018
1 parent ab2b559 commit 92e716d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webpack_config/makeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ module.exports = function(opts = {}) {
path: path.resolve(config.path.output, options.outputDir),
filename: options.isProduction ? `[name].${commitHash}.js` : '[name].js',
publicPath: isDownloadable && options.isProduction ? './' : '/',
crossOriginLoading: 'anonymous'
crossOriginLoading: 'anonymous',
// Fix workers & HMR https://github.com/webpack/webpack/issues/6642
globalObject: options.isProduction ? undefined : 'self'
};

// The final bundle
Expand Down

0 comments on commit 92e716d

Please sign in to comment.