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

Commit 6b5aa36

Browse files
author
vakrilov
committed
feat: support for file qualifiers
1 parent d3b5cab commit 6b5aa36

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

bundle-config-loader.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ const unitTestingConfigLoader = require("./unit-testing-config-loader");
22

33
module.exports = function (source, map) {
44
this.cacheable();
5-
const { angular = false, loadCss = true, unitTesting, projectRoot, appFullPath, registerModules = /(root|page)\.(xml|css|js|ts|scss)$/ } = this.query;
5+
const {
6+
angular = false,
7+
loadCss = true,
8+
unitTesting,
9+
projectRoot,
10+
appFullPath,
11+
registerModules = /(root|page)(\.(land|port|phone|tablet|minH\d+|minW\d+|minWH\d+))?\.(xml|css|js|ts|scss)$/
12+
} = this.query;
613

714
if (unitTesting) {
815
source = unitTestingConfigLoader({ appFullPath, projectRoot, angular, rootPagesRegExp: registerModules });

demo/JavaScriptApp/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module.exports = env => {
180180
},
181181

182182
{
183-
test: /-page\.js$/,
183+
test: /-page(\.(land|port|phone|tablet|minH\d+|minW\d+|minWH\d+))?\.js$/,
184184
use: "nativescript-dev-webpack/script-hot-loader"
185185
},
186186

demo/TypeScriptApp/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ module.exports = env => {
186186
},
187187

188188
{
189-
test: /-page\.ts$/,
189+
test: /-page(\.(land|port|phone|tablet|minH\d+|minW\d+|minWH\d+))?\.ts$/,
190190
use: "nativescript-dev-webpack/script-hot-loader"
191191
},
192192

templates/webpack.javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ module.exports = env => {
179179
},
180180

181181
{
182-
test: /-page\.js$/,
182+
test: /-page(\.(land|port|phone|tablet|minH\d+|minW\d+|minWH\d+))?\.js$/,
183183
use: "nativescript-dev-webpack/script-hot-loader"
184184
},
185185

templates/webpack.typescript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ module.exports = env => {
185185
},
186186

187187
{
188-
test: /-page\.ts$/,
188+
test: /-page(\.(land|port|phone|tablet|minH\d+|minW\d+|minWH\d+))?\.ts$/,
189189
use: "nativescript-dev-webpack/script-hot-loader"
190190
},
191191

templates/webpack.vue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ module.exports = env => {
265265
if (unitTesting) {
266266
config.module.rules.push(
267267
{
268-
test: /-page\.js$/,
268+
test: /-page(\.(land|port|phone|tablet|minH\d+|minW\d+|minWH\d+))?\.js$/,
269269
use: "nativescript-dev-webpack/script-hot-loader"
270270
},
271271
{

0 commit comments

Comments
 (0)