diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index e94ffc0d..22b0b558 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -262,7 +262,7 @@ module.exports = env => { // Define useful constants like TNS_WEBPACK new webpack.DefinePlugin({ "global.TNS_WEBPACK": "true", - "process": undefined, + "process": "global.process", }), // Remove all files from the out dir. new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), diff --git a/templates/webpack.javascript.js b/templates/webpack.javascript.js index c910a055..b976e827 100644 --- a/templates/webpack.javascript.js +++ b/templates/webpack.javascript.js @@ -213,7 +213,7 @@ module.exports = env => { // Define useful constants like TNS_WEBPACK new webpack.DefinePlugin({ "global.TNS_WEBPACK": "true", - "process": undefined, + "process": "global.process", }), // Remove all files from the out dir. new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), diff --git a/templates/webpack.typescript.js b/templates/webpack.typescript.js index daf5a94b..b04e72e2 100644 --- a/templates/webpack.typescript.js +++ b/templates/webpack.typescript.js @@ -237,7 +237,7 @@ module.exports = env => { // Define useful constants like TNS_WEBPACK new webpack.DefinePlugin({ "global.TNS_WEBPACK": "true", - "process": undefined, + "process": "global.process", }), // Remove all files from the out dir. new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), diff --git a/templates/webpack.vue.js b/templates/webpack.vue.js index 1d451d4c..600c399c 100644 --- a/templates/webpack.vue.js +++ b/templates/webpack.vue.js @@ -75,7 +75,7 @@ module.exports = env => { itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); } - + const config = { mode: mode, context: appFullPath, @@ -238,7 +238,8 @@ module.exports = env => { // Define useful constants like TNS_WEBPACK new webpack.DefinePlugin({ "global.TNS_WEBPACK": "true", - "TNS_ENV": JSON.stringify(mode) + "TNS_ENV": JSON.stringify(mode), + "process": "global.process" }), // Remove all files from the out dir. new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),