@mpxjs/webpack-plugin 2.8.23 → 2.8.25

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.
@@ -98,14 +98,7 @@ module.exports = function (content) {
98
98
  if (err) return callback(err)
99
99
  if (!this._compilation) return callback()
100
100
  const targetPath = path.relative(context, file)
101
- this._compilation.assets[targetPath] = {
102
- size: function size () {
103
- return stats.size
104
- },
105
- source: function source () {
106
- return content
107
- }
108
- }
101
+ this.emitFile(targetPath, content)
109
102
  callback()
110
103
  })
111
104
  }
@@ -223,18 +223,18 @@ module.exports = async function loader (content, map, meta) {
223
223
  imports.unshift({
224
224
  type: 'api_import',
225
225
  importName: '___CSS_LOADER_API_IMPORT___',
226
- url: stringifyRequest(this, require.resolve('./runtime/api'))
226
+ url: stringifyRequest(this, '!!' + require.resolve('./runtime/api'))
227
227
  })
228
228
 
229
229
  if (options.sourceMap) {
230
230
  imports.unshift({
231
231
  importName: '___CSS_LOADER_API_SOURCEMAP_IMPORT___',
232
- url: stringifyRequest(this, require.resolve('./runtime/sourceMaps'))
232
+ url: stringifyRequest(this, '!!' + require.resolve('./runtime/sourceMaps'))
233
233
  })
234
234
  } else {
235
235
  imports.unshift({
236
236
  importName: '___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___',
237
- url: stringifyRequest(this, require.resolve('./runtime/noSourceMaps'))
237
+ url: stringifyRequest(this, '!!' + require.resolve('./runtime/noSourceMaps'))
238
238
  })
239
239
  }
240
240
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.8.23",
3
+ "version": "2.8.25",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"
@@ -82,5 +82,5 @@
82
82
  "engines": {
83
83
  "node": ">=14.14.0"
84
84
  },
85
- "gitHead": "8d573d2c89a59e94ac464a42ef022a38441ac541"
85
+ "gitHead": "f144694b7bc4db69572b1b3b1123c720a6cca018"
86
86
  }