Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit b509bb3

Browse files
PeterStaevsis0k0
authored andcommitted
feat(xml-namespace-loader): add ignore option (#605)
With the ignore option user can exclude any local fragments and register them either manually or by using the registerModules regex option for the bundle-config-loader Closes #558.
1 parent bfecb8c commit b509bb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎xml-namespace-loader.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const { convertSlashesInPath } = require("./projectHelpers");
33

44
module.exports = function (source) {
55
this.value = source;
6+
const { ignore } = this.query;
67

78
const { XmlParser } = require("tns-core-modules/xml");
89

@@ -14,7 +15,8 @@ module.exports = function (source) {
1415
if (
1516
namespace &&
1617
!namespace.startsWith("http") &&
17-
!namespaces.some(n => n.name === moduleName)
18+
!namespaces.some(n => n.name === moduleName) &&
19+
(!ignore || !moduleName.match(ignore))
1820
) {
1921
const localNamespacePath = join(this.rootContext, namespace);
2022
const localModulePath = join(localNamespacePath, elementName);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /