diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index d0babd02..9e98a093 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -179,7 +179,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 6ddda324..10ec2ad0 100644 --- a/templates/webpack.javascript.js +++ b/templates/webpack.javascript.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.typescript.js b/templates/webpack.typescript.js index 42485d03..1a31289f 100644 --- a/templates/webpack.typescript.js +++ b/templates/webpack.typescript.js @@ -143,7 +143,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 559fce76..81877d18 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"); @@ -154,7 +154,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" && {