@mpxjs/webpack-plugin 2.9.71 → 2.9.72
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/config.js
CHANGED
|
@@ -138,7 +138,9 @@ module.exports = {
|
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
getEvent (eventName, prefix = 'on') {
|
|
141
|
-
return
|
|
141
|
+
return prefix + dash2hump(eventName.replace(/^./, (matched) => {
|
|
142
|
+
return matched.toUpperCase()
|
|
143
|
+
}))
|
|
142
144
|
},
|
|
143
145
|
defaultModelProp: 'value',
|
|
144
146
|
defaultModelEvent: 'input',
|
|
@@ -302,7 +302,9 @@ module.exports = function getSpec ({ warn, error }) {
|
|
|
302
302
|
const rPrefix = runRules(spec.event.prefix, prefix, { mode: 'ali' })
|
|
303
303
|
const rEventName = runRules(eventRules, eventName, { mode: 'ali' })
|
|
304
304
|
return {
|
|
305
|
-
name:
|
|
305
|
+
name: rPrefix + dash2hump(rEventName.replace(/^./, (matched) => {
|
|
306
|
+
return matched.toUpperCase()
|
|
307
|
+
})) + modifierStr,
|
|
306
308
|
value
|
|
307
309
|
}
|
|
308
310
|
},
|
|
@@ -9,6 +9,7 @@ module.exports = function (script, {
|
|
|
9
9
|
moduleId,
|
|
10
10
|
isProduction,
|
|
11
11
|
jsonConfig,
|
|
12
|
+
outputPath,
|
|
12
13
|
builtInComponentsMap,
|
|
13
14
|
localComponentsMap,
|
|
14
15
|
localPagesMap
|
|
@@ -64,7 +65,7 @@ global.__navigationHelper = {
|
|
|
64
65
|
jsonConfig
|
|
65
66
|
})
|
|
66
67
|
|
|
67
|
-
output += buildGlobalParams({ moduleId, scriptSrcMode, loaderContext, isProduction, ctorType, jsonConfig, componentsMap })
|
|
68
|
+
output += buildGlobalParams({ moduleId, scriptSrcMode, loaderContext, isProduction, ctorType, jsonConfig, componentsMap, outputPath })
|
|
68
69
|
output += getRequireScript({ ctorType, script, loaderContext })
|
|
69
70
|
output += `export default global.__mpxOptionsMap[${JSON.stringify(moduleId)}]\n`
|
|
70
71
|
}
|
|
@@ -88,7 +88,8 @@ function buildGlobalParams ({
|
|
|
88
88
|
jsonConfig,
|
|
89
89
|
componentsMap,
|
|
90
90
|
pagesMap,
|
|
91
|
-
firstPage
|
|
91
|
+
firstPage,
|
|
92
|
+
outputPath
|
|
92
93
|
}) {
|
|
93
94
|
let content = ''
|
|
94
95
|
if (ctorType === 'app') {
|
|
@@ -117,6 +118,9 @@ global.currentInject.firstPage = ${JSON.stringify(firstPage)}\n`
|
|
|
117
118
|
content += `global.currentInject.getComponents = function () {
|
|
118
119
|
return ${shallowStringify(componentsMap)}
|
|
119
120
|
}\n`
|
|
121
|
+
if (ctorType === 'component') {
|
|
122
|
+
content += `global.currentInject.componentPath = '/' + ${JSON.stringify(outputPath)}\n`
|
|
123
|
+
}
|
|
120
124
|
}
|
|
121
125
|
content += `global.currentModuleId = ${JSON.stringify(moduleId)}\n`
|
|
122
126
|
content += `global.currentSrcMode = ${JSON.stringify(scriptSrcMode)}\n`
|
|
@@ -808,7 +808,7 @@ function parse (template, options) {
|
|
|
808
808
|
Array.isArray(val.errorArray) && val.errorArray.forEach(item => error$1(item))
|
|
809
809
|
})
|
|
810
810
|
|
|
811
|
-
if (!tagNames.has('component') && options.checkUsingComponents) {
|
|
811
|
+
if (!tagNames.has('component') && !tagNames.has('template') && options.checkUsingComponents) {
|
|
812
812
|
const arr = []
|
|
813
813
|
usingComponents.forEach((item) => {
|
|
814
814
|
if (!tagNames.has(item) && !options.globalComponents.includes(item) && !options.componentPlaceholder.includes(item)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.72",
|
|
4
4
|
"description": "mpx compile core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mpx"
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"engines": {
|
|
100
100
|
"node": ">=14.14.0"
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "5ceca0430a79a41456260d87a81760f2cd31fad1"
|
|
103
103
|
}
|