From 298c9f6ed4b6c21afaf8858e9ec7222830fa0be3 Mon Sep 17 00:00:00 2001 From: fatme Date: Thu, 14 Mar 2019 16:02:48 +0200 Subject: [PATCH 1/2] fix: execute bundle-config-loader only for the entry point of the application Currently bundle-config-loader is executed for any file of the application with the same name as main entry file. For example if the javascript application has app.js file located in ./app/some-folder/app.js, the bundle-config-loader will be executed for this file. --- templates/webpack.angular.js | 2 +- templates/webpack.javascript.js | 2 +- templates/webpack.typescript.js | 2 +- templates/webpack.vue.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index a10d2b96..06a465cc 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -177,7 +177,7 @@ module.exports = env => { module: { rules: [ { - test: new RegExp(entryPath), + test: new RegExp(join(appFullPath, entryPath)), use: [ // Require all Android app components platform === "android" && { diff --git a/templates/webpack.javascript.js b/templates/webpack.javascript.js index c98cdad7..1786b3ad 100644 --- a/templates/webpack.javascript.js +++ b/templates/webpack.javascript.js @@ -139,7 +139,7 @@ module.exports = env => { module: { rules: [ { - test: new RegExp(entryPath), + test: new RegExp(join(appFullPath, entryPath)), use: [ // Require all Android app components platform === "android" && { diff --git a/templates/webpack.typescript.js b/templates/webpack.typescript.js index ec088514..ff28c258 100644 --- a/templates/webpack.typescript.js +++ b/templates/webpack.typescript.js @@ -141,7 +141,7 @@ module.exports = env => { module: { rules: [ { - test: new RegExp(entryPath), + test: new RegExp(join(appFullPath, entryPath)), use: [ // Require all Android app components platform === "android" && { diff --git a/templates/webpack.vue.js b/templates/webpack.vue.js index 4ad892d3..1fe80f62 100644 --- a/templates/webpack.vue.js +++ b/templates/webpack.vue.js @@ -151,7 +151,7 @@ module.exports = env => { }, module: { rules: [{ - test: new RegExp(entryPath + ".(js|ts)"), + test: new RegExp(join(appFullPath, entryPath + ".(js|ts)")), use: [ // Require all Android app components platform === "android" && { From fa76f7cc2b487eae24c59f75aebad801b8e15d67 Mon Sep 17 00:00:00 2001 From: fatme Date: Tue, 19 Mar 2019 11:42:11 +0200 Subject: [PATCH 2/2] chore: fix unit tests for vue --- templates/webpack.vue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/webpack.vue.js b/templates/webpack.vue.js index 1fe80f62..eb465a92 100644 --- a/templates/webpack.vue.js +++ b/templates/webpack.vue.js @@ -1,4 +1,4 @@ -const { relative, resolve, sep } = require("path"); +const { join, relative, resolve, sep } = require("path"); const webpack = require("webpack"); const CleanWebpackPlugin = require("clean-webpack-plugin");