Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 36824b1

Browse files
author
Fatme
authored
fix: execute bundle-config-loader only for the entry point of the application (#829)
* 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. * chore: fix unit tests for vue
1 parent 41b0a64 commit 36824b1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Diff for: templates/webpack.angular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ module.exports = env => {
179179
module: {
180180
rules: [
181181
{
182-
test: new RegExp(entryPath),
182+
test: new RegExp(join(appFullPath, entryPath)),
183183
use: [
184184
// Require all Android app components
185185
platform === "android" && {

Diff for: templates/webpack.javascript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ module.exports = env => {
141141
module: {
142142
rules: [
143143
{
144-
test: new RegExp(entryPath),
144+
test: new RegExp(join(appFullPath, entryPath)),
145145
use: [
146146
// Require all Android app components
147147
platform === "android" && {

Diff for: templates/webpack.typescript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ module.exports = env => {
143143
module: {
144144
rules: [
145145
{
146-
test: new RegExp(entryPath),
146+
test: new RegExp(join(appFullPath, entryPath)),
147147
use: [
148148
// Require all Android app components
149149
platform === "android" && {

Diff for: templates/webpack.vue.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { relative, resolve, sep } = require("path");
1+
const { join, relative, resolve, sep } = require("path");
22

33
const webpack = require("webpack");
44
const CleanWebpackPlugin = require("clean-webpack-plugin");
@@ -154,7 +154,7 @@ module.exports = env => {
154154
},
155155
module: {
156156
rules: [{
157-
test: new RegExp(entryPath + ".(js|ts)"),
157+
test: new RegExp(join(appFullPath, entryPath + ".(js|ts)")),
158158
use: [
159159
// Require all Android app components
160160
platform === "android" && {

0 commit comments

Comments
 (0)