@mpxjs/webpack-plugin 2.10.16-beta.2 → 2.10.16-beta.4
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/lib/loader.js +2 -0
- package/lib/react/index.js +2 -0
- package/lib/react/processTemplate.js +2 -0
- package/lib/web/index.js +2 -0
- package/lib/web/processTemplate.js +2 -0
- package/lib/wxs/pre-loader.js +1 -1
- package/package.json +1 -1
package/lib/loader.js
CHANGED
|
@@ -148,6 +148,7 @@ module.exports = function (content) {
|
|
|
148
148
|
hasComment,
|
|
149
149
|
isNative,
|
|
150
150
|
usingComponentsInfo: JSON.stringify(usingComponentsInfo),
|
|
151
|
+
originalUsingComponents,
|
|
151
152
|
componentGenerics,
|
|
152
153
|
autoScope,
|
|
153
154
|
callback
|
|
@@ -170,6 +171,7 @@ module.exports = function (content) {
|
|
|
170
171
|
hasComment,
|
|
171
172
|
isNative,
|
|
172
173
|
usingComponentsInfo: JSON.stringify(usingComponentsInfo),
|
|
174
|
+
originalUsingComponents,
|
|
173
175
|
componentGenerics,
|
|
174
176
|
autoScope,
|
|
175
177
|
callback
|
package/lib/react/index.js
CHANGED
|
@@ -21,6 +21,7 @@ module.exports = function ({
|
|
|
21
21
|
hasComment,
|
|
22
22
|
isNative,
|
|
23
23
|
usingComponentsInfo,
|
|
24
|
+
originalUsingComponents,
|
|
24
25
|
componentGenerics,
|
|
25
26
|
autoScope,
|
|
26
27
|
callback
|
|
@@ -53,6 +54,7 @@ module.exports = function ({
|
|
|
53
54
|
moduleId,
|
|
54
55
|
ctorType,
|
|
55
56
|
usingComponentsInfo,
|
|
57
|
+
originalUsingComponents,
|
|
56
58
|
componentGenerics
|
|
57
59
|
}, callback)
|
|
58
60
|
},
|
|
@@ -17,6 +17,7 @@ module.exports = function (template, {
|
|
|
17
17
|
moduleId,
|
|
18
18
|
ctorType,
|
|
19
19
|
usingComponentsInfo,
|
|
20
|
+
originalUsingComponents,
|
|
20
21
|
componentGenerics
|
|
21
22
|
}, callback) {
|
|
22
23
|
const mpx = loaderContext.getMpx()
|
|
@@ -68,6 +69,7 @@ module.exports = function (template, {
|
|
|
68
69
|
warn,
|
|
69
70
|
error,
|
|
70
71
|
usingComponentsInfo, // processTemplate中无其他地方使用,直接透传 string 类型
|
|
72
|
+
originalUsingComponents,
|
|
71
73
|
hasComment,
|
|
72
74
|
isNative,
|
|
73
75
|
ctorType,
|
package/lib/web/index.js
CHANGED
|
@@ -21,6 +21,7 @@ module.exports = function ({
|
|
|
21
21
|
hasComment,
|
|
22
22
|
isNative,
|
|
23
23
|
usingComponentsInfo,
|
|
24
|
+
originalUsingComponents,
|
|
24
25
|
componentGenerics,
|
|
25
26
|
autoScope,
|
|
26
27
|
callback
|
|
@@ -70,6 +71,7 @@ module.exports = function ({
|
|
|
70
71
|
moduleId,
|
|
71
72
|
ctorType,
|
|
72
73
|
usingComponentsInfo,
|
|
74
|
+
originalUsingComponents,
|
|
73
75
|
componentGenerics
|
|
74
76
|
}, callback)
|
|
75
77
|
},
|
|
@@ -13,6 +13,7 @@ module.exports = function (template, {
|
|
|
13
13
|
moduleId,
|
|
14
14
|
ctorType,
|
|
15
15
|
usingComponentsInfo,
|
|
16
|
+
originalUsingComponents,
|
|
16
17
|
componentGenerics
|
|
17
18
|
}, callback) {
|
|
18
19
|
const mpx = loaderContext.getMpx()
|
|
@@ -77,6 +78,7 @@ module.exports = function (template, {
|
|
|
77
78
|
warn,
|
|
78
79
|
error,
|
|
79
80
|
usingComponentsInfo, // processTemplate中无其他地方使用,直接透传 string 类型
|
|
81
|
+
originalUsingComponents,
|
|
80
82
|
hasComment,
|
|
81
83
|
isNative,
|
|
82
84
|
ctorType,
|
package/lib/wxs/pre-loader.js
CHANGED
|
@@ -100,7 +100,7 @@ module.exports = function (content) {
|
|
|
100
100
|
MemberExpression (path) {
|
|
101
101
|
const property = path.node.property
|
|
102
102
|
if (
|
|
103
|
-
(property.name === 'constructor' || property.value === 'constructor') &&
|
|
103
|
+
property && (property.name === 'constructor' || property.value === 'constructor') &&
|
|
104
104
|
!(t.isMemberExpression(path.parent) && path.parentKey === 'object')
|
|
105
105
|
) {
|
|
106
106
|
path.replaceWith(t.memberExpression(path.node, t.identifier('name')))
|