Skip to content

Commit

Permalink
Remove unnecessary global re-definitions
Browse files Browse the repository at this point in the history
Webpack supports having multiple DefinePlugins in the build, so we don't
need to worry about canceling out the affect of the other DefinePlugin
that's already provided by the shared webpack config.
  • Loading branch information
p-jackson committed Oct 22, 2020
1 parent 1e455af commit 7644403
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions apps/editing-toolkit/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,7 @@ function getWebpackConfig( env = {}, argv = {} ) {
( plugin ) => plugin.constructor.name !== 'DependencyExtractionWebpackPlugin'
),
new webpack.DefinePlugin( {
'process.env.NODE_ENV': JSON.stringify( process.env.NODE_ENV ),
'process.env.FORCE_REDUCED_MOTION': JSON.stringify(
!! process.env.FORCE_REDUCED_MOTION || false
),
__i18n_text_domain__: JSON.stringify( 'full-site-editing' ),
global: 'window',
} ),
new DependencyExtractionWebpackPlugin( {
injectPolyfill: true,
Expand Down

0 comments on commit 7644403

Please sign in to comment.