@mpxjs/webpack-plugin 2.9.21 → 2.9.24

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.
@@ -442,11 +442,11 @@ module.exports = function (content) {
442
442
  }
443
443
  const tarRoot = subPackage.tarRoot || subPackage.root || ''
444
444
  const srcRoot = subPackage.srcRoot || subPackage.root || ''
445
- if (!tarRoot || subPackagesCfg[tarRoot]) return callback()
445
+ if (!tarRoot) return callback()
446
446
 
447
447
  context = path.join(context, srcRoot)
448
448
  const otherConfig = getOtherConfig(subPackage)
449
- subPackagesCfg[tarRoot] = {
449
+ subPackagesCfg[tarRoot] = subPackagesCfg[tarRoot] || {
450
450
  root: tarRoot,
451
451
  pages: []
452
452
  }
@@ -20,7 +20,7 @@ module.exports = function getRulesRunner ({
20
20
  wx: require('./json/wx')
21
21
  }
22
22
  }
23
- const spec = specMap[type]?.[srcMode]?.({ warn, error })
23
+ const spec = specMap[type] && specMap[type][srcMode] && specMap[type][srcMode]({ warn, error })
24
24
  if (spec && spec.supportedModes.indexOf(mode) > -1) {
25
25
  const normalizeTest = spec.normalizeTest
26
26
  const mainRules = mainKey ? spec[mainKey] : spec
@@ -34,7 +34,7 @@ module.exports = function (template, {
34
34
 
35
35
  if (ctorType === 'app') {
36
36
  const { el } = webConfig
37
- const idName = el?.match(/#(.*)/)?.[1] || 'app'
37
+ const idName = (el && el.match(/#(.*)/) && el.match(/#(.*)/)[1]) || 'app'
38
38
  template = {
39
39
  tag: 'template',
40
40
  content: `<div id="${idName}"><mpx-keep-alive><router-view></router-view></mpx-keep-alive></div>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.9.21",
3
+ "version": "2.9.24",
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": "0ed5fa50016bd13a170c38619cfa9cbcc352ba23"
86
+ "gitHead": "9713dfb8335cbe7cad4912a89ae34e27e013e01e"
87
87
  }