diff --git a/examples/mf-v2-host/package.json b/examples/mf-v2-host/package.json index 9ae9798bdf6a..957cf425dbfd 100644 --- a/examples/mf-v2-host/package.json +++ b/examples/mf-v2-host/package.json @@ -1,5 +1,5 @@ { - "name": "@example/mf-v2-host", + "name": "@example/mfv2-host", "private": true, "scripts": { "build": "max build", diff --git a/examples/mf-v2-remote/package.json b/examples/mf-v2-remote/package.json index 4e5497bd89f2..035658a9095a 100644 --- a/examples/mf-v2-remote/package.json +++ b/examples/mf-v2-remote/package.json @@ -1,5 +1,5 @@ { - "name": "@example/mf-v2-remote", + "name": "@example/mfv2-remote", "private": true, "scripts": { "build": "max build", diff --git a/packages/preset-vue/src/features/config/config.ts b/packages/preset-vue/src/features/config/config.ts index 0a8952f288bf..243ee516d453 100644 --- a/packages/preset-vue/src/features/config/config.ts +++ b/packages/preset-vue/src/features/config/config.ts @@ -1,6 +1,5 @@ import Config from '@umijs/bundler-webpack/compiled/webpack-5-chain'; import { IApi } from 'umi'; -import VueLoaderPlugin from 'vue-loader/dist/pluginWebpack5.js'; import { addAssetRules } from './assetRules'; export function getConfig(config: Config, api: IApi) { @@ -23,7 +22,9 @@ export function getConfig(config: Config, api: IApi) { babelParserPlugins: ['jsx', 'classProperties', 'decorators-legacy'], }); - config.plugin('vue-loader-plugin').use(VueLoaderPlugin); + const VueLoaderPlugin = require('vue-loader/dist/pluginWebpack5'); + + config.plugin('vue-loader-plugin').use(VueLoaderPlugin.default); // https://github.com/vuejs/vue-loader/issues/1435#issuecomment-869074949 config.module