@mpxjs/webpack-plugin 2.9.24 → 2.9.26
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
CHANGED
|
@@ -172,7 +172,6 @@ class MpxWebpackPlugin {
|
|
|
172
172
|
options.asyncSubpackageRules = options.asyncSubpackageRules || []
|
|
173
173
|
options.optimizeRenderRules = options.optimizeRenderRules ? (Array.isArray(options.optimizeRenderRules) ? options.optimizeRenderRules : [options.optimizeRenderRules]) : []
|
|
174
174
|
options.retryRequireAsync = options.retryRequireAsync || false
|
|
175
|
-
options.enableAliRequireAsync = options.enableAliRequireAsync || false
|
|
176
175
|
options.optimizeSize = options.optimizeSize || false
|
|
177
176
|
this.options = options
|
|
178
177
|
// Hack for buildDependencies
|
|
@@ -649,7 +648,7 @@ class MpxWebpackPlugin {
|
|
|
649
648
|
useRelativePath: this.options.useRelativePath,
|
|
650
649
|
removedChunks: [],
|
|
651
650
|
forceProxyEventRules: this.options.forceProxyEventRules,
|
|
652
|
-
supportRequireAsync: this.options.mode === 'wx' || this.options.mode === 'web' ||
|
|
651
|
+
supportRequireAsync: this.options.mode === 'wx' || this.options.mode === 'web' || this.options.mode === 'ali',
|
|
653
652
|
partialCompile: this.options.partialCompile,
|
|
654
653
|
collectDynamicEntryInfo: ({ resource, packageName, filename, entryType }) => {
|
|
655
654
|
const curInfo = mpx.dynamicEntryInfo[packageName] = mpx.dynamicEntryInfo[packageName] || {
|
|
@@ -1126,7 +1125,7 @@ class MpxWebpackPlugin {
|
|
|
1126
1125
|
if (tarRoot) {
|
|
1127
1126
|
// 删除root query
|
|
1128
1127
|
if (queryObj.root) request = addQuery(request, {}, false, ['root'])
|
|
1129
|
-
// wx、ali
|
|
1128
|
+
// wx、ali和web平台支持require.async,其余平台使用CommonJsAsyncDependency进行模拟抹平
|
|
1130
1129
|
if (mpx.supportRequireAsync) {
|
|
1131
1130
|
if (mpx.mode === 'web') {
|
|
1132
1131
|
const depBlock = new AsyncDependenciesBlock(
|
|
@@ -59,9 +59,7 @@ function MpxEvent (layer) {
|
|
|
59
59
|
this.sendEvent(this.targetElement, 'tap', event)
|
|
60
60
|
}
|
|
61
61
|
this.sendEvent = (targetElement, type, event) => {
|
|
62
|
-
|
|
63
|
-
const touchEvent = new TouchEvent(type, {
|
|
64
|
-
view: window,
|
|
62
|
+
const touchEvent = new CustomEvent(type, {
|
|
65
63
|
bubbles: true,
|
|
66
64
|
cancelable: true
|
|
67
65
|
})
|
package/lib/runtime/i18n.wxs
CHANGED
|
@@ -271,7 +271,11 @@ function getMessage (messages, locale, fallbackLocale, key) {
|
|
|
271
271
|
|
|
272
272
|
function resolve (messages, locale, key) {
|
|
273
273
|
if (messages && messages[locale] && key) {
|
|
274
|
-
|
|
274
|
+
var format = getPathValue(messages[locale], key)
|
|
275
|
+
if (format == null) {
|
|
276
|
+
format = messages[locale][key]
|
|
277
|
+
}
|
|
278
|
+
return format
|
|
275
279
|
}
|
|
276
280
|
}
|
|
277
281
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.26",
|
|
4
4
|
"description": "mpx compile core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mpx"
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=14.14.0"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "0abcc7e543b5c4c4af14b2154b78b15c1f571160"
|
|
87
87
|
}
|