@lwrjs/lwc-module-provider 0.17.2-alpha.2 → 0.17.2-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/compiler.cjs +8 -2
- package/build/es/compiler.js +11 -3
- package/package.json +8 -8
package/build/cjs/compiler.cjs
CHANGED
|
@@ -39,6 +39,12 @@ var DEFAULT_BABEL_CONFIG = {
|
|
|
39
39
|
plugins: [["decorators", {decoratorsBeforeExport: true}]]
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
function skipCompilation(namespace, theName) {
|
|
43
|
+
if (!namespace && theName === "lwc" || namespace === "@lwc" || namespace === "lwr" && theName === "hmr") {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
42
48
|
var LwcCompiler = class {
|
|
43
49
|
constructor(compiler) {
|
|
44
50
|
this.compiler = compiler;
|
|
@@ -89,7 +95,7 @@ var LwcCompiler = class {
|
|
|
89
95
|
}
|
|
90
96
|
source = result.code;
|
|
91
97
|
}
|
|
92
|
-
if (namespace
|
|
98
|
+
if (skipCompilation(namespace, name)) {
|
|
93
99
|
return {
|
|
94
100
|
code: source,
|
|
95
101
|
map: null,
|
|
@@ -97,7 +103,7 @@ var LwcCompiler = class {
|
|
|
97
103
|
};
|
|
98
104
|
}
|
|
99
105
|
const transformConfig = {
|
|
100
|
-
namespace,
|
|
106
|
+
namespace: namespace || "",
|
|
101
107
|
name,
|
|
102
108
|
experimentalDynamicComponent: {
|
|
103
109
|
strictSpecifier: false
|
package/build/es/compiler.js
CHANGED
|
@@ -11,6 +11,15 @@ const DEFAULT_BABEL_CONFIG = {
|
|
|
11
11
|
plugins: [['decorators', { decoratorsBeforeExport: true }]],
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
|
+
function skipCompilation(namespace, theName) {
|
|
15
|
+
if ((!namespace && theName === 'lwc') || // LWC framework
|
|
16
|
+
namespace === '@lwc' || // other LWC framework packages
|
|
17
|
+
(namespace === 'lwr' && theName === 'hmr') // HMR module (until we dont allow swap methods)
|
|
18
|
+
) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
14
23
|
export class LwcCompiler {
|
|
15
24
|
constructor(compiler) {
|
|
16
25
|
// Allow callers to pass in their own version of the LWC compiler
|
|
@@ -64,8 +73,7 @@ export class LwcCompiler {
|
|
|
64
73
|
}
|
|
65
74
|
source = result.code;
|
|
66
75
|
}
|
|
67
|
-
|
|
68
|
-
if (namespace === 'lwr' && name === 'hmr') {
|
|
76
|
+
if (skipCompilation(namespace, name)) {
|
|
69
77
|
return {
|
|
70
78
|
code: source,
|
|
71
79
|
map: null,
|
|
@@ -73,7 +81,7 @@ export class LwcCompiler {
|
|
|
73
81
|
};
|
|
74
82
|
}
|
|
75
83
|
const transformConfig = {
|
|
76
|
-
namespace,
|
|
84
|
+
namespace: namespace || '',
|
|
77
85
|
name,
|
|
78
86
|
experimentalDynamicComponent: {
|
|
79
87
|
strictSpecifier: false,
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.17.2-alpha.
|
|
7
|
+
"version": "0.17.2-alpha.20",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"build": "tsc -b"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel/preset-typescript": "^7.
|
|
37
|
-
"@lwrjs/diagnostics": "0.17.2-alpha.
|
|
38
|
-
"@lwrjs/fs-watch": "0.17.2-alpha.
|
|
39
|
-
"@lwrjs/shared-utils": "0.17.2-alpha.
|
|
36
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
37
|
+
"@lwrjs/diagnostics": "0.17.2-alpha.20",
|
|
38
|
+
"@lwrjs/fs-watch": "0.17.2-alpha.20",
|
|
39
|
+
"@lwrjs/shared-utils": "0.17.2-alpha.20",
|
|
40
40
|
"fs-extra": "^11.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@lwrjs/types": "0.17.2-alpha.
|
|
43
|
+
"@lwrjs/types": "0.17.2-alpha.20",
|
|
44
44
|
"memfs": "^4.13.0",
|
|
45
45
|
"typescript": "^4.9.5"
|
|
46
46
|
},
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"@lwc/module-resolver": ">= 2.x"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
52
|
+
"node": ">=20.0.0"
|
|
53
53
|
},
|
|
54
54
|
"volta": {
|
|
55
55
|
"extends": "../../../package.json"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "871213620dec8ff886be421339f1e90e86dbee96"
|
|
58
58
|
}
|