From 23ea9ac48eab37baecd0ee8182950cab6a1f0475 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 2 Jun 2019 21:36:17 -0700 Subject: [PATCH] Fix webpack `process.*` variable definitions --- lib/core/src/server/preview/iframe-webpack.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core/src/server/preview/iframe-webpack.config.js b/lib/core/src/server/preview/iframe-webpack.config.js index 95b74bf96125..cd801cc4c0ca 100644 --- a/lib/core/src/server/preview/iframe-webpack.config.js +++ b/lib/core/src/server/preview/iframe-webpack.config.js @@ -59,8 +59,7 @@ export default ({ template: require.resolve(`../templates/index.ejs`), }), new DefinePlugin({ - 'process.env': stringified, - process: JSON.stringify(true), + process: { browser: true, env: stringified }, NODE_ENV: JSON.stringify(process.env.NODE_ENV), }), isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths),