Browse Source

Fix env variables usage in webpack - 2nd attempt

jojo 5 years ago
parent
commit
931f3fac7b
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/index.html
  2. 2 2
      webpack.config.js

+ 1 - 1
src/index.html

@@ -38,7 +38,7 @@
 </head>
 
 <body>
-  <% if (process.env.CORDOVA === true) { %>
+  <% if (process.env.CORDOVA === "true") { %>
 
   <div class="app">
     <div id="deviceready" class="blink">

+ 2 - 2
webpack.config.js

@@ -22,10 +22,10 @@ var definePlugin = new webpack.DefinePlugin({
 
 var outpath = './webpack/';
 
-if (process.env.CORDOVA === true) {
+if (process.env.CORDOVA === "true") {
   outpath = './www/';
   console.log('CORDOVA environment : output in ',outpath);
-} else if (process.env.WEB === true) {
+} else if (process.env.WEB === "true") {
   outpath = './www_web/';
   console.log('WEB environment : output in ',outpath);
 } else {