@mpxjs/webpack-plugin 2.7.35 → 2.7.36

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/wxs/loader.js CHANGED
@@ -2,6 +2,7 @@ const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin')
2
2
  const EntryPlugin = require('webpack/lib/EntryPlugin')
3
3
  const LazySet = require('webpack/lib/util/LazySet')
4
4
  const LimitChunkCountPlugin = require('webpack/lib/optimize/LimitChunkCountPlugin')
5
+ const FlagEntryExportAsUsedPlugin = require('webpack/lib/FlagEntryExportAsUsedPlugin')
5
6
  const path = require('path')
6
7
  const WxsPlugin = require('./WxsPlugin')
7
8
  const RecordResourceMapDependency = require('../dependencies/RecordResourceMapDependency')
@@ -81,7 +82,8 @@ module.exports.pitch = function (remainingRequest) {
81
82
  new WxsPlugin({ mode }),
82
83
  new NodeTargetPlugin(),
83
84
  new EntryPlugin(this.context, request, { name: getName(filename) }),
84
- new LimitChunkCountPlugin({ maxChunks: 1 })
85
+ new LimitChunkCountPlugin({ maxChunks: 1 }),
86
+ new FlagEntryExportAsUsedPlugin(true, 'entry')
85
87
  ]
86
88
 
87
89
  const childCompiler = this._compilation.createChildCompiler(resourcePath, outputOptions, plugins)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.7.35",
3
+ "version": "2.7.36",
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": "c034d454986fe1f932784f26295d59328da951c3"
83
+ "gitHead": "5838576bdde0b66664f8121c729143ff4ed0aef4"
84
84
  }