Skip to content

Commit 497c6d1

Browse files
author
mater
committed
fix: vue-loader version
1 parent 7debbb2 commit 497c6d1

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

packages/vue-cli-plugin-mpx/commands/build/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ module.exports.registerBuildCommand = function (api, options) {
4848
target,
4949
args
5050
)
51+
// 最终配置支持异步修改
52+
await api.runAfterResolveWebpackCallBack(webpackConfig)
5153
return new Promise((resolve, reject) => {
5254
webpack(webpackConfig, (err, stats) => {
5355
handleWebpackDone(err, stats, args.watch)

packages/vue-cli-plugin-mpx/commands/serve/web.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ module.exports.serveWeb = async (api, options, args) => {
3434
target,
3535
args
3636
)
37+
// 最终配置支持异步修改
38+
await api.runAfterResolveWebpackCallBack(webpackConfig)
3739
const projectDevServerOptions = webpackConfig.devServer || {}
3840

3941
// resolve server options

packages/vue-cli-plugin-mpx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@mpxjs/cli-shared-utils": "^2.1.33",
1414
"@soda/friendly-errors-webpack-plugin": "^1.8.0",
1515
"@vue/cli-shared-utils": "^5.0.4",
16-
"@vue/vue-loader-v15": "npm:vue-loader@^15.9.7",
16+
"@vue/vue-loader-v15": "npm:vue-loader@^15.11.1",
1717
"ansi-escapes": "^4.1.0",
1818
"babel-loader": "^8.1.0",
1919
"cli-highlight": "^2.1.10",

packages/vue-cli-plugin-mpx/utils/webpack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function handleWebpackDone (err, stats, watch) {
1212
? 'with some warnings'
1313
: 'successfully'
1414
getReporter()._renderStates(
15-
stats.stats.map((v) => {
15+
(stats.stats || []).map((v) => {
1616
return {
1717
...v,
1818
message: `Compiled ${status}`,

0 commit comments

Comments
 (0)