@mpxjs/webpack-plugin 2.9.41 → 2.9.42
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.
|
@@ -578,12 +578,12 @@ module.exports = function (content) {
|
|
|
578
578
|
const srcCustomKey = config[srcMode].tabBar.customKey
|
|
579
579
|
const srcPath = resolveTabBarPath(srcCustomKey)
|
|
580
580
|
const outputPath = resolveTabBarPath(outputCustomKey)
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
581
|
+
processComponent(`./${srcPath}`, context, {
|
|
582
|
+
outputPath,
|
|
583
|
+
extraOptions: {
|
|
584
|
+
replaceContent: 'true'
|
|
585
|
+
}
|
|
586
|
+
}, (err, entry) => {
|
|
587
587
|
if (err === RESOLVE_IGNORED_ERR) {
|
|
588
588
|
delete tabBar[srcCustomKey]
|
|
589
589
|
return callback()
|
|
@@ -597,6 +597,26 @@ module.exports = function (content) {
|
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
+
const processAppBar = (appBar, context, callback) => {
|
|
601
|
+
if (appBar) {
|
|
602
|
+
processComponent('./app-bar/index', context, {
|
|
603
|
+
outputPath: 'app-bar/index',
|
|
604
|
+
extraOptions: {
|
|
605
|
+
replaceContent: 'true'
|
|
606
|
+
}
|
|
607
|
+
}, (err, entry) => {
|
|
608
|
+
if (err === RESOLVE_IGNORED_ERR) {
|
|
609
|
+
return callback()
|
|
610
|
+
}
|
|
611
|
+
if (err) return callback(err)
|
|
612
|
+
appBar.custom = entry // hack for javascript parser call hook.
|
|
613
|
+
callback()
|
|
614
|
+
})
|
|
615
|
+
} else {
|
|
616
|
+
callback()
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
600
620
|
const processPluginGenericsImplementation = (plugin, context, tarRoot, callback) => {
|
|
601
621
|
if (!plugin.genericsImplementation) return callback()
|
|
602
622
|
const relativePath = useRelativePath ? publicPath + tarRoot : ''
|
|
@@ -673,6 +693,9 @@ module.exports = function (content) {
|
|
|
673
693
|
},
|
|
674
694
|
(callback) => {
|
|
675
695
|
processSubPackages(json.subPackages || json.subpackages, this.context, callback)
|
|
696
|
+
},
|
|
697
|
+
(callback) => {
|
|
698
|
+
processAppBar(json.appBar, this.context, callback)
|
|
676
699
|
}
|
|
677
700
|
], (err) => {
|
|
678
701
|
if (err) return callback(err)
|
|
@@ -1654,9 +1654,10 @@ function processFor (el) {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
1656
|
|
|
1657
|
-
function processRefReact (el,
|
|
1657
|
+
function processRefReact (el, meta) {
|
|
1658
1658
|
const val = getAndRemoveAttr(el, config[mode].directive.ref).val
|
|
1659
|
-
|
|
1659
|
+
// rn中只有内建组件能被作为node ref处理
|
|
1660
|
+
const type = el.isBuiltIn ? 'node' : 'component'
|
|
1660
1661
|
if (val) {
|
|
1661
1662
|
if (!meta.refs) {
|
|
1662
1663
|
meta.refs = []
|
|
@@ -2522,7 +2523,7 @@ function processElement (el, root, options, meta) {
|
|
|
2522
2523
|
// 预处理代码维度条件编译
|
|
2523
2524
|
processIf(el)
|
|
2524
2525
|
processFor(el)
|
|
2525
|
-
processRefReact(el,
|
|
2526
|
+
processRefReact(el, meta)
|
|
2526
2527
|
processStyleReact(el)
|
|
2527
2528
|
processEventReact(el, options, meta)
|
|
2528
2529
|
processComponentIs(el, options)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.42",
|
|
4
4
|
"description": "mpx compile core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mpx"
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"engines": {
|
|
86
86
|
"node": ">=14.14.0"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "45c7fd96af6723fa8c8ea2d659065417e66c77e2"
|
|
89
89
|
}
|