@mpxjs/webpack-plugin 2.7.11 → 2.7.12

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.
Files changed (2) hide show
  1. package/lib/index.js +5 -4
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -1300,10 +1300,11 @@ try {
1300
1300
  let insertBeforeIndex = -1
1301
1301
  const info = typeLoaderProcessInfo[type]
1302
1302
  loaders.forEach((loader, index) => {
1303
- if (loader.loader.includes(info[0])) {
1303
+ const currentLoader = toPosix(loader.loader)
1304
+ if (currentLoader.includes(info[0])) {
1304
1305
  loader.loader = info[1]
1305
1306
  }
1306
- if (loader.loader.includes(info[1])) {
1307
+ if (currentLoader.includes(info[1])) {
1307
1308
  insertBeforeIndex = index
1308
1309
  }
1309
1310
  })
@@ -1343,13 +1344,13 @@ try {
1343
1344
 
1344
1345
  if (mpx.mode === 'web') {
1345
1346
  const mpxStyleOptions = queryObj.mpxStyleOptions
1346
- const firstLoader = (loaders[0] && loaders[0].loader) || ''
1347
+ const firstLoader = toPosix(loaders[0] && loaders[0].loader) || ''
1347
1348
  const isPitcherRequest = firstLoader.includes('vue-loader/lib/loaders/pitcher')
1348
1349
  let cssLoaderIndex = -1
1349
1350
  let vueStyleLoaderIndex = -1
1350
1351
  let mpxStyleLoaderIndex = -1
1351
1352
  loaders.forEach((loader, index) => {
1352
- const currentLoader = loader.loader
1353
+ const currentLoader = toPosix(loader.loader)
1353
1354
  if (currentLoader.includes('css-loader')) {
1354
1355
  cssLoaderIndex = index
1355
1356
  } else if (currentLoader.includes('vue-loader/lib/loaders/stylePostLoader')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.7.11",
3
+ "version": "2.7.12",
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": "484feb97fc5741ce3984fd235833fe0ab83593b9"
83
+ "gitHead": "5917df99372acfdca21ce770cb8bf8f780974311"
84
84
  }