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

Commit d02bd91

Browse files
committed
refactor: simplify regex in webpack config
1 parent 46b2501 commit d02bd91

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: templates/webpack.angular.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ module.exports = env => {
205205

206206
if (platform === "android") {
207207
// Require all Android app components
208-
// in the entry module (bundle.ts)
208+
// in the entry module
209209
config.module.rules.unshift({
210-
test: new RegExp(`${entryPath}`),
210+
test: new RegExp(entryPath),
211211
use: {
212212
loader: "nativescript-dev-webpack/android-app-components-loader",
213213
options: { modules: appComponents }

Diff for: templates/webpack.javascript.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ module.exports = env => {
180180

181181
if (platform === "android") {
182182
// Require all Android app components
183-
// in the entry module (bundle.js).
183+
// in the entry module
184184
config.module.rules.unshift({
185-
test: new RegExp(`${entryPath}`),
185+
test: new RegExp(entryPath),
186186
use: {
187187
loader: "nativescript-dev-webpack/android-app-components-loader",
188188
options: { modules: appComponents }

Diff for: templates/webpack.typescript.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ module.exports = env => {
182182

183183
if (platform === "android") {
184184
// Require all Android app components
185-
// in the entry module (bundle.ts).
185+
// in the entry module
186186
config.module.rules.unshift({
187-
test: new RegExp(`${entryPath}`),
187+
test: new RegExp(entryPath),
188188
use: {
189189
loader: "nativescript-dev-webpack/android-app-components-loader",
190190
options: { modules: appComponents }

0 commit comments

Comments
 (0)