Skip to content

Commit

Permalink
Fix a require hijack by the formidable package
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Oct 15, 2020
1 parent c050d4f commit 27ad8a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/webpack.config.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ const webpackConfig = {
BUILD_TIMESTAMP: JSON.stringify( new Date().toISOString() ),
COMMIT_SHA: JSON.stringify( commitSha ),
'process.env.NODE_ENV': JSON.stringify( bundleEnv ),
// The `formidable` package (used by `superagent`) contains conditional code that hijacks
// the `require` function. That breaks webpack.
'global.GENTLY': false,
} ),
new webpack.NormalModuleReplacementPlugin(
/^my-sites[/\\]themes[/\\]theme-upload$/,
Expand Down

0 comments on commit 27ad8a7

Please sign in to comment.