@mpxjs/webpack-plugin 2.7.18 → 2.7.19
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.
|
@@ -114,8 +114,8 @@ class DynamicEntryDependency extends NullDependency {
|
|
|
114
114
|
updateHash (hash, context) {
|
|
115
115
|
const { resultPath, relativePath } = this
|
|
116
116
|
if (resultPath) hash.update(resultPath)
|
|
117
|
-
// relativePath为MPX_CURRENT_CHUNK
|
|
118
|
-
if (relativePath === MPX_CURRENT_CHUNK) hash.update('' + Math.random())
|
|
117
|
+
// relativePath为MPX_CURRENT_CHUNK时,插入随机hash使当前module的codeGeneration cache失效,从而执行dep.apply动态获取当前module所属的chunk路径
|
|
118
|
+
if (relativePath === MPX_CURRENT_CHUNK) hash.update('' + (+new Date()) + Math.random())
|
|
119
119
|
super.updateHash(hash, context)
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -1901,20 +1901,20 @@ function getVirtualHostRoot (options, meta) {
|
|
|
1901
1901
|
}
|
|
1902
1902
|
|
|
1903
1903
|
function processShow (el, options, root) {
|
|
1904
|
+
// 开启 virtualhost 全部走 props 传递处理
|
|
1905
|
+
// 未开启 virtualhost 直接绑定 display:none 到节点上
|
|
1904
1906
|
let show = getAndRemoveAttr(el, config[mode].directive.show).val
|
|
1905
1907
|
if (mode === 'swan') show = wrapMustache(show)
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1908
|
+
|
|
1909
|
+
if (options.hasVirtualHost) {
|
|
1910
|
+
if (options.isComponent && el.parent === root && isRealNode(el)) {
|
|
1911
|
+
if (show !== undefined) {
|
|
1912
|
+
show = `{{${parseMustache(show).result}&&mpxShow}}`
|
|
1913
|
+
} else {
|
|
1914
|
+
show = '{{mpxShow}}'
|
|
1915
|
+
}
|
|
1914
1916
|
}
|
|
1915
|
-
|
|
1916
|
-
if (show !== undefined) {
|
|
1917
|
-
if (isComponentNode(el, options)) {
|
|
1917
|
+
if (isComponentNode(el, options) && show !== undefined) {
|
|
1918
1918
|
if (show === '') {
|
|
1919
1919
|
show = '{{false}}'
|
|
1920
1920
|
}
|
|
@@ -1923,6 +1923,14 @@ function processShow (el, options, root) {
|
|
|
1923
1923
|
value: show
|
|
1924
1924
|
}])
|
|
1925
1925
|
} else {
|
|
1926
|
+
processShowStyle()
|
|
1927
|
+
}
|
|
1928
|
+
} else {
|
|
1929
|
+
processShowStyle()
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
function processShowStyle () {
|
|
1933
|
+
if (show !== undefined) {
|
|
1926
1934
|
const showExp = parseMustache(show).result
|
|
1927
1935
|
let oldStyle = getAndRemoveAttr(el, 'style').val
|
|
1928
1936
|
oldStyle = oldStyle ? oldStyle + ';' : ''
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.19",
|
|
4
4
|
"description": "mpx compile core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mpx"
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"engines": {
|
|
81
81
|
"node": ">=14.14.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "adadff7f3e1c658678def33059e222ef053af4d6"
|
|
84
84
|
}
|