Skip to content

Commit

Permalink
fix: cli依赖修复 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
mater1996 authored Mar 1, 2024
1 parent bd31912 commit 2959ced
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/mpx-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dependencies": {
"@types/inquirer": "^8.1.3",
"@vue/cli": "^5.0.0",
"@vue/cli-shared-utils": "^5.0.4",
"commander": "^7.1.0",
"fs-extra": "^9.1.0",
"inquirer": "^8.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/vue-cli-plugin-mpx/config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const { getReporter } = require('../utils/reporter')
* @param { string } name
*/
function changeStyleVueRuleToMpx (config, name) {
// 移除vue-modules规则,因为mpx在构建时会在resourceQuery携带filename,这会导致带有
// module命名的mpx文件命中vue-modules规则,导致样式编译错误
config.module.rule(name).oneOfs.delete('vue-modules')
// 抹平web和mp配置的命名,方便一次修改
const store = config.module.rule(name).oneOfs.store
const value = store.get('vue')
value.name = 'mpx'
Expand Down

0 comments on commit 2959ced

Please sign in to comment.