@mpxjs/webpack-plugin 2.7.14 → 2.7.17
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/index.js +19 -18
- package/lib/json-compiler/helper.js +2 -0
- package/lib/json-compiler/index.js +7 -3
- package/lib/loader.js +12 -2
- package/lib/partial-compile/index.js +35 -0
- package/lib/platform/json/wx/index.js +1 -1
- package/lib/platform/template/normalize-component-rules.js +2 -3
- package/lib/runtime/components/web/mpx-image.vue +13 -5
- package/lib/template-compiler/compiler.js +49 -39
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const ReplaceDependency = require('./dependencies/ReplaceDependency')
|
|
|
8
8
|
const NullFactory = require('webpack/lib/NullFactory')
|
|
9
9
|
const CommonJsVariableDependency = require('./dependencies/CommonJsVariableDependency')
|
|
10
10
|
const CommonJsAsyncDependency = require('./dependencies/CommonJsAsyncDependency')
|
|
11
|
+
const harmonySpecifierTag = require('webpack/lib/dependencies/HarmonyImportDependencyParserPlugin').harmonySpecifierTag
|
|
11
12
|
const NormalModule = require('webpack/lib/NormalModule')
|
|
12
13
|
const EntryPlugin = require('webpack/lib/EntryPlugin')
|
|
13
14
|
const JavascriptModulesPlugin = require('webpack/lib/javascript/JavascriptModulesPlugin')
|
|
@@ -33,6 +34,7 @@ const DynamicEntryDependency = require('./dependencies/DynamicEntryDependency')
|
|
|
33
34
|
const FlagPluginDependency = require('./dependencies/FlagPluginDependency')
|
|
34
35
|
const RemoveEntryDependency = require('./dependencies/RemoveEntryDependency')
|
|
35
36
|
const SplitChunksPlugin = require('webpack/lib/optimize/SplitChunksPlugin')
|
|
37
|
+
const PartialCompilePlugin = require('./partial-compile/index')
|
|
36
38
|
const fixRelative = require('./utils/fix-relative')
|
|
37
39
|
const parseRequest = require('./utils/parse-request')
|
|
38
40
|
const { matchCondition } = require('./utils/match-condition')
|
|
@@ -130,7 +132,7 @@ class MpxWebpackPlugin {
|
|
|
130
132
|
})
|
|
131
133
|
// 批量指定源码mode
|
|
132
134
|
options.modeRules = options.modeRules || {}
|
|
133
|
-
|
|
135
|
+
options.generateBuildMap = options.generateBuildMap || false
|
|
134
136
|
options.attributes = options.attributes || []
|
|
135
137
|
options.externals = (options.externals || []).map((external) => {
|
|
136
138
|
return externalsMap[external] || external
|
|
@@ -159,6 +161,7 @@ class MpxWebpackPlugin {
|
|
|
159
161
|
cssLangs: ['css', 'less', 'stylus', 'scss', 'sass']
|
|
160
162
|
}, options.nativeConfig)
|
|
161
163
|
options.webConfig = options.webConfig || {}
|
|
164
|
+
options.partialCompile = options.mode !== 'web' && options.partialCompile
|
|
162
165
|
this.options = options
|
|
163
166
|
// Hack for buildDependencies
|
|
164
167
|
const rawResolveBuildDependencies = FileSystemInfo.prototype.resolveBuildDependencies
|
|
@@ -366,6 +369,10 @@ class MpxWebpackPlugin {
|
|
|
366
369
|
|
|
367
370
|
let mpx
|
|
368
371
|
|
|
372
|
+
if (this.options.partialCompile) {
|
|
373
|
+
new PartialCompilePlugin(this.options.partialCompile).apply(compiler)
|
|
374
|
+
}
|
|
375
|
+
|
|
369
376
|
const getPackageCacheGroup = packageName => {
|
|
370
377
|
if (packageName === 'main') {
|
|
371
378
|
return {
|
|
@@ -1117,7 +1124,7 @@ class MpxWebpackPlugin {
|
|
|
1117
1124
|
}
|
|
1118
1125
|
|
|
1119
1126
|
if (mpx.srcMode !== mpx.mode) {
|
|
1120
|
-
parser.hooks.callMemberChain.for(
|
|
1127
|
+
parser.hooks.callMemberChain.for(harmonySpecifierTag).tap('MpxWebpackPlugin', handler)
|
|
1121
1128
|
parser.hooks.callMemberChain.for('mpx').tap('MpxWebpackPlugin', handler)
|
|
1122
1129
|
parser.hooks.callMemberChain.for('wx').tap('MpxWebpackPlugin', handler)
|
|
1123
1130
|
}
|
|
@@ -1130,22 +1137,16 @@ class MpxWebpackPlugin {
|
|
|
1130
1137
|
}, () => {
|
|
1131
1138
|
if (mpx.mode === 'web') return
|
|
1132
1139
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
// },
|
|
1144
|
-
// size: () => {
|
|
1145
|
-
// return Buffer.byteLength(outputMap, 'utf8')
|
|
1146
|
-
// }
|
|
1147
|
-
// }
|
|
1148
|
-
// }
|
|
1140
|
+
if (this.options.generateBuildMap) {
|
|
1141
|
+
const pagesMap = compilation.__mpx__.pagesMap
|
|
1142
|
+
const componentsPackageMap = compilation.__mpx__.componentsMap
|
|
1143
|
+
const componentsMap = Object.keys(componentsPackageMap).map(item => componentsPackageMap[item]).reduce((pre, cur) => {
|
|
1144
|
+
return { ...pre, ...cur }
|
|
1145
|
+
}, {})
|
|
1146
|
+
const outputMap = JSON.stringify({ ...pagesMap, ...componentsMap })
|
|
1147
|
+
const filename = this.options.generateBuildMap.filename || 'outputMap.json'
|
|
1148
|
+
compilation.assets[filename] = new RawSource(outputMap)
|
|
1149
|
+
}
|
|
1149
1150
|
|
|
1150
1151
|
const {
|
|
1151
1152
|
globalObject,
|
|
@@ -97,6 +97,8 @@ module.exports = function createJSONHelper ({ loaderContext, emitWarning, custom
|
|
|
97
97
|
if (resolveMode === 'native') {
|
|
98
98
|
page = urlToRequest(page)
|
|
99
99
|
}
|
|
100
|
+
// 增加 page 标识
|
|
101
|
+
page = addQuery(page, { isPage: true })
|
|
100
102
|
resolve(context, page, loaderContext, (err, resource) => {
|
|
101
103
|
if (err) return callback(err)
|
|
102
104
|
const { resourcePath, queryObj: { isFirst } } = parseRequest(resource)
|
|
@@ -571,10 +571,14 @@ module.exports = function (content) {
|
|
|
571
571
|
delete json.subPackages
|
|
572
572
|
json.pages = localPages
|
|
573
573
|
for (let root in subPackagesCfg) {
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
const subPackageCfg = subPackagesCfg[root]
|
|
575
|
+
// 分包不存在 pages,输出 subPackages 字段会报错
|
|
576
|
+
if (subPackageCfg.pages.length) {
|
|
577
|
+
if (!json.subPackages) {
|
|
578
|
+
json.subPackages = []
|
|
579
|
+
}
|
|
580
|
+
json.subPackages.push(subPackageCfg)
|
|
576
581
|
}
|
|
577
|
-
json.subPackages.push(subPackagesCfg[root])
|
|
578
582
|
}
|
|
579
583
|
const processOutput = (output) => {
|
|
580
584
|
output = processDynamicEntry(output)
|
package/lib/loader.js
CHANGED
|
@@ -18,15 +18,23 @@ const AppEntryDependency = require('./dependencies/AppEntryDependency')
|
|
|
18
18
|
const RecordResourceMapDependency = require('./dependencies/RecordResourceMapDependency')
|
|
19
19
|
const CommonJsVariableDependency = require('./dependencies/CommonJsVariableDependency')
|
|
20
20
|
const { MPX_APP_MODULE_ID } = require('./utils/const')
|
|
21
|
+
const path = require('path')
|
|
21
22
|
|
|
22
23
|
module.exports = function (content) {
|
|
23
24
|
this.cacheable()
|
|
24
25
|
|
|
26
|
+
// 兼容处理处理ts-loader中watch-run/updateFile逻辑,直接跳过当前loader及后续的vue-loader返回内容
|
|
27
|
+
if (path.extname(this.resourcePath) === '.ts') {
|
|
28
|
+
this.loaderIndex -= 2
|
|
29
|
+
return content
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
const mpx = this.getMpx()
|
|
26
33
|
if (!mpx) {
|
|
27
34
|
return content
|
|
28
35
|
}
|
|
29
36
|
const { resourcePath, queryObj } = parseRequest(this.resource)
|
|
37
|
+
|
|
30
38
|
const packageRoot = queryObj.packageRoot || mpx.currentPackageRoot
|
|
31
39
|
const packageName = packageRoot || 'main'
|
|
32
40
|
const independent = queryObj.independent
|
|
@@ -298,8 +306,10 @@ module.exports = function (content) {
|
|
|
298
306
|
// require style
|
|
299
307
|
output += getRequire('styles', style, extraOptions, i) + '\n'
|
|
300
308
|
})
|
|
301
|
-
}
|
|
302
|
-
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (parts.styles.filter(style => !style.src).length === 0 && ctorType === 'app' && mode === 'ali') {
|
|
312
|
+
output += getRequire('styles', {}, {}, parts.styles.length) + '\n'
|
|
303
313
|
}
|
|
304
314
|
|
|
305
315
|
// json
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const { matchCondition } = require('../utils/match-condition')
|
|
2
|
+
const { parseQuery } = require('loader-utils')
|
|
3
|
+
|
|
4
|
+
class MpxPartialCompilePlugin {
|
|
5
|
+
constructor (condition) {
|
|
6
|
+
this.condition = condition
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
isResolvingPage (obj) {
|
|
10
|
+
// valid query should start with '?'
|
|
11
|
+
const query = obj.query || '?'
|
|
12
|
+
return parseQuery(query).isPage
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
apply (compiler) {
|
|
16
|
+
compiler.resolverFactory.hooks.resolver.intercept({
|
|
17
|
+
factory: (type, hook) => {
|
|
18
|
+
hook.tap('MpxPartialCompilePlugin', (resolver) => {
|
|
19
|
+
resolver.hooks.result.tapAsync({
|
|
20
|
+
name: 'MpxPartialCompilePlugin',
|
|
21
|
+
stage: -100
|
|
22
|
+
}, (obj, resolverContext, callback) => {
|
|
23
|
+
if (this.isResolvingPage(obj) && !matchCondition(obj.path, this.condition)) {
|
|
24
|
+
obj.path = false
|
|
25
|
+
}
|
|
26
|
+
callback(null, obj)
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
return hook
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
module.exports = MpxPartialCompilePlugin
|
|
@@ -246,7 +246,7 @@ module.exports = function getSpec ({ warn, error }) {
|
|
|
246
246
|
jd: deletePath()
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
|
-
test: 'navigateToMiniProgramAppIdList|networkTimeout
|
|
249
|
+
test: 'navigateToMiniProgramAppIdList|networkTimeout',
|
|
250
250
|
ali: deletePath(),
|
|
251
251
|
jd: deletePath()
|
|
252
252
|
},
|
|
@@ -4,7 +4,7 @@ const runRules = require('../run-rules')
|
|
|
4
4
|
* @desc 针对每一个组件(属性,event,指令等)执行规则判断
|
|
5
5
|
* @params cfgs [{test: 'camera', props:[], event: []}] 组件配置列表
|
|
6
6
|
* @params spec ../index.js中公共的spec
|
|
7
|
-
*/
|
|
7
|
+
*/
|
|
8
8
|
module.exports = function normalizeComponentRules (cfgs, spec) {
|
|
9
9
|
return cfgs.map((cfg) => {
|
|
10
10
|
const result = {}
|
|
@@ -25,9 +25,8 @@ module.exports = function normalizeComponentRules (cfgs, spec) {
|
|
|
25
25
|
data
|
|
26
26
|
}
|
|
27
27
|
el.attrsList.forEach((attr) => {
|
|
28
|
-
let rAttr = runRules(spec.preAttrs, attr, options)
|
|
29
28
|
const meta = {}
|
|
30
|
-
rAttr = runRules(spec.directive,
|
|
29
|
+
let rAttr = runRules(spec.directive, attr, {
|
|
31
30
|
...options,
|
|
32
31
|
meta
|
|
33
32
|
})
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
height: this.image.height
|
|
30
30
|
}
|
|
31
31
|
})
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
this.$emit('load', e)
|
|
34
34
|
}
|
|
35
35
|
this.image.onerror = (e) => {
|
|
@@ -45,14 +45,22 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
render (createElement) {
|
|
48
|
-
if (this.mode === 'widthFix') {
|
|
48
|
+
if (this.mode === 'widthFix' || this.mode === 'heightFix') {
|
|
49
|
+
let style
|
|
50
|
+
if (this.mode === 'widthFix') {
|
|
51
|
+
style = {
|
|
52
|
+
height: 'auto'
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
style = {
|
|
56
|
+
width: 'auto'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
49
59
|
const domProps = {}
|
|
50
60
|
if (this.src) domProps.src = this.src
|
|
51
61
|
return createElement('img', {
|
|
52
62
|
domProps,
|
|
53
|
-
style
|
|
54
|
-
height: 'auto'
|
|
55
|
-
},
|
|
63
|
+
style,
|
|
56
64
|
class: ['mpx-image'],
|
|
57
65
|
on: getInnerListeners(this, { ignoredListeners: ['load', 'error'] })
|
|
58
66
|
})
|
|
@@ -11,6 +11,7 @@ const addQuery = require('../utils/add-query')
|
|
|
11
11
|
const transDynamicClassExpr = require('./trans-dynamic-class-expr')
|
|
12
12
|
const dash2hump = require('../utils/hump-dash').dash2hump
|
|
13
13
|
const { inBrowser } = require('../utils/env')
|
|
14
|
+
|
|
14
15
|
/**
|
|
15
16
|
* Make a map and return a function for checking if a key
|
|
16
17
|
* is in that map.
|
|
@@ -738,9 +739,6 @@ function parse (template, options) {
|
|
|
738
739
|
currentParent.children.push(element)
|
|
739
740
|
element.parent = currentParent
|
|
740
741
|
processElement(element, root, options, meta)
|
|
741
|
-
if (isComponentNode(element, options) && mode === 'ali' && !options.hasVirtualHost) {
|
|
742
|
-
processAliAddComponentRootView(element, options, stack, currentParent)
|
|
743
|
-
}
|
|
744
742
|
tagNames.add(element.tag)
|
|
745
743
|
|
|
746
744
|
if (!unary) {
|
|
@@ -748,7 +746,7 @@ function parse (template, options) {
|
|
|
748
746
|
stack.push(element)
|
|
749
747
|
} else {
|
|
750
748
|
element.unary = true
|
|
751
|
-
closeElement(element, meta)
|
|
749
|
+
closeElement(element, meta, options)
|
|
752
750
|
}
|
|
753
751
|
},
|
|
754
752
|
|
|
@@ -763,7 +761,7 @@ function parse (template, options) {
|
|
|
763
761
|
// pop stack
|
|
764
762
|
stack.pop()
|
|
765
763
|
currentParent = stack[stack.length - 1]
|
|
766
|
-
closeElement(element, meta)
|
|
764
|
+
closeElement(element, meta, options)
|
|
767
765
|
}
|
|
768
766
|
},
|
|
769
767
|
|
|
@@ -906,6 +904,19 @@ function modifyAttr (el, name, val) {
|
|
|
906
904
|
}
|
|
907
905
|
}
|
|
908
906
|
|
|
907
|
+
function moveBaseDirective (target, from, isDelete = true) {
|
|
908
|
+
target.for = from.for
|
|
909
|
+
target.if = from.if
|
|
910
|
+
target.elseif = from.elseif
|
|
911
|
+
target.else = from.else
|
|
912
|
+
if (isDelete) {
|
|
913
|
+
delete from.for
|
|
914
|
+
delete from.if
|
|
915
|
+
delete from.elseif
|
|
916
|
+
delete from.else
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
909
920
|
function stringify (str) {
|
|
910
921
|
return JSON.stringify(str)
|
|
911
922
|
}
|
|
@@ -1802,7 +1813,7 @@ function processBuiltInComponents (el, meta) {
|
|
|
1802
1813
|
}
|
|
1803
1814
|
}
|
|
1804
1815
|
|
|
1805
|
-
function processAliAddComponentRootView (el, options
|
|
1816
|
+
function processAliAddComponentRootView (el, options) {
|
|
1806
1817
|
const processAttrsConditions = [
|
|
1807
1818
|
{ condition: /^(on|catch)Tap$/, action: 'clone' },
|
|
1808
1819
|
{ condition: /^(on|catch)TouchStart$/, action: 'clone' },
|
|
@@ -1811,8 +1822,11 @@ function processAliAddComponentRootView (el, options, stack, currentParent) {
|
|
|
1811
1822
|
{ condition: /^(on|catch)TouchCancel$/, action: 'clone' },
|
|
1812
1823
|
{ condition: /^(on|catch)LongTap$/, action: 'clone' },
|
|
1813
1824
|
{ condition: /^data-/, action: 'clone' },
|
|
1814
|
-
{ condition:
|
|
1815
|
-
{ condition:
|
|
1825
|
+
{ condition: /^style$/, action: 'move' },
|
|
1826
|
+
{ condition: /^slot$/, action: 'move' }
|
|
1827
|
+
]
|
|
1828
|
+
const processAppendAttrsRules = [
|
|
1829
|
+
{ name: 'class', value: `${MPX_ROOT_VIEW} host-${options.moduleId}` }
|
|
1816
1830
|
]
|
|
1817
1831
|
let newElAttrs = []
|
|
1818
1832
|
let allAttrs = cloneAttrsList(el.attrsList)
|
|
@@ -1822,23 +1836,18 @@ function processAliAddComponentRootView (el, options, stack, currentParent) {
|
|
|
1822
1836
|
}
|
|
1823
1837
|
|
|
1824
1838
|
function processMove (attr) {
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
newElAttrs.push({
|
|
1828
|
-
name: attr,
|
|
1829
|
-
value: movedAttr.val
|
|
1830
|
-
})
|
|
1831
|
-
}
|
|
1839
|
+
getAndRemoveAttr(el, attr.name)
|
|
1840
|
+
newElAttrs.push(attr)
|
|
1832
1841
|
}
|
|
1833
1842
|
|
|
1834
|
-
function
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1843
|
+
function processAppendRules (el) {
|
|
1844
|
+
processAppendAttrsRules.forEach((rule) => {
|
|
1845
|
+
const getNeedAppendAttrValue = el.attrsMap[rule.name]
|
|
1846
|
+
const value = getNeedAppendAttrValue ? getNeedAppendAttrValue + ' ' + rule.value : rule.value
|
|
1847
|
+
newElAttrs.push({
|
|
1848
|
+
name: rule.name,
|
|
1849
|
+
value
|
|
1850
|
+
})
|
|
1842
1851
|
})
|
|
1843
1852
|
}
|
|
1844
1853
|
|
|
@@ -1850,22 +1859,21 @@ function processAliAddComponentRootView (el, options, stack, currentParent) {
|
|
|
1850
1859
|
processClone(attr)
|
|
1851
1860
|
} else if (item.action === 'move') {
|
|
1852
1861
|
processMove(attr)
|
|
1853
|
-
} else if (item.action === 'append') {
|
|
1854
|
-
processAppend(attr, item)
|
|
1855
1862
|
}
|
|
1856
1863
|
}
|
|
1857
1864
|
})
|
|
1858
1865
|
})
|
|
1859
1866
|
|
|
1860
|
-
|
|
1867
|
+
processAppendRules(el)
|
|
1861
1868
|
let componentWrapView = createASTElement('view', newElAttrs)
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
el.parent = componentWrapView
|
|
1869
|
+
moveBaseDirective(componentWrapView, el)
|
|
1870
|
+
if (el.is && el.components) {
|
|
1871
|
+
el = postProcessComponentIs(el)
|
|
1872
|
+
}
|
|
1867
1873
|
|
|
1868
|
-
el
|
|
1874
|
+
replaceNode(el, componentWrapView, true)
|
|
1875
|
+
addChild(componentWrapView, el)
|
|
1876
|
+
return componentWrapView
|
|
1869
1877
|
}
|
|
1870
1878
|
|
|
1871
1879
|
// 有virtualHost情况wx组件注入virtualHost。无virtualHost阿里组件注入root-view。其他跳过。
|
|
@@ -2104,7 +2112,7 @@ function processElement (el, root, options, meta) {
|
|
|
2104
2112
|
processAttrs(el, options)
|
|
2105
2113
|
}
|
|
2106
2114
|
|
|
2107
|
-
function closeElement (el, meta) {
|
|
2115
|
+
function closeElement (el, meta, options) {
|
|
2108
2116
|
postProcessAtMode(el)
|
|
2109
2117
|
if (mode === 'web') {
|
|
2110
2118
|
postProcessWxs(el, meta)
|
|
@@ -2114,8 +2122,13 @@ function closeElement (el, meta) {
|
|
|
2114
2122
|
}
|
|
2115
2123
|
const pass = isNative || postProcessTemplate(el) || processingTemplate
|
|
2116
2124
|
postProcessWxs(el, meta)
|
|
2125
|
+
|
|
2117
2126
|
if (!pass) {
|
|
2118
|
-
|
|
2127
|
+
if (isComponentNode(el, options) && !options.hasVirtualHost && mode === 'ali') {
|
|
2128
|
+
el = processAliAddComponentRootView(el, options)
|
|
2129
|
+
} else {
|
|
2130
|
+
el = postProcessComponentIs(el)
|
|
2131
|
+
}
|
|
2119
2132
|
}
|
|
2120
2133
|
postProcessFor(el)
|
|
2121
2134
|
postProcessIf(el)
|
|
@@ -2154,10 +2167,7 @@ function postProcessComponentIs (el) {
|
|
|
2154
2167
|
let tempNode
|
|
2155
2168
|
if (el.for || el.if || el.elseif || el.else) {
|
|
2156
2169
|
tempNode = createASTElement('block', [])
|
|
2157
|
-
tempNode
|
|
2158
|
-
tempNode.if = el.if
|
|
2159
|
-
tempNode.elseif = el.elseif
|
|
2160
|
-
tempNode.else = el.else
|
|
2170
|
+
moveBaseDirective(tempNode, el)
|
|
2161
2171
|
} else {
|
|
2162
2172
|
tempNode = getTempNode()
|
|
2163
2173
|
}
|
|
@@ -2183,7 +2193,7 @@ function postProcessComponentIs (el) {
|
|
|
2183
2193
|
if (!el.parent) {
|
|
2184
2194
|
error$1('Dynamic component can not be the template root, considering wrapping it with <view> or <text> tag!')
|
|
2185
2195
|
} else {
|
|
2186
|
-
el = replaceNode(el, tempNode) || el
|
|
2196
|
+
el = replaceNode(el, tempNode, true) || el
|
|
2187
2197
|
}
|
|
2188
2198
|
}
|
|
2189
2199
|
return el
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.17",
|
|
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": "6079aab5d336ecfac4a94a2fef44aa989cdf6614"
|
|
84
84
|
}
|