]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
build: add browser env to webpack builds
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 15 Apr 2020 08:07:57 +0000 (10:07 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 15 Apr 2020 08:07:57 +0000 (10:07 +0200)
e2e/webpack.config.js
webpack.config.js

index 38dccf8362cc22357fab560cd91bd907b18793de..def3182bce8a48dee38fec995b4f360238c6d599 100644 (file)
@@ -75,7 +75,7 @@ const config = (env = {}) => ({
   plugins: [
     new webpack.DefinePlugin({
       __DEV__: JSON.stringify(process.env.NODE_ENV !== 'production'),
-      __BROWSER__: `typeof window !== 'undefined'`,
+      __BROWSER__: 'true',
       'process.env': {
         NODE_ENV: JSON.stringify(process.env.NODE_ENV),
       },
index 660c5295d0650a6ffda25bf40994e4347014def4..1b2f70f9ddce726115c2fc47b69c6fa685105acf 100644 (file)
@@ -54,6 +54,7 @@ const config = (env = {}) => ({
     }),
     new webpack.DefinePlugin({
       __DEV__: JSON.stringify(!env.prod),
+      __BROWSER__: 'true',
       'process.env': {
         NODE_ENV: JSON.stringify(process.env.NODE_ENV),
       },