Skip to content

Commit

Permalink
Fix DefinePlugin warning Webpack emits on a fresh install with create…
Browse files Browse the repository at this point in the history
…-react-app (#1440)
  • Loading branch information
quassnoi committed Apr 7, 2023
1 parent 6d1f90a commit f81ed4d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ export function getGlobalsPlugin(
return new userWebpack.DefinePlugin({
// "if (__DEV__)" blocks get stripped when compiling a static export build
__DEV__: JSON.stringify(devServerOn),
'process.env': {
NODE_ENV: JSON.stringify(getWebpackNodeEnv()),
PUBLIC_URL: JSON.stringify(cleanPublicUrl),
},
'process.env.NODE_ENV': JSON.stringify(getWebpackNodeEnv()),
'process.env.PUBLIC_URL': JSON.stringify(cleanPublicUrl)
});
}

Expand Down

0 comments on commit f81ed4d

Please sign in to comment.