Skip to content

Commit

Permalink
fix: 修复输出H5 Vue 文件中样式隔离失效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackgan3 committed Nov 7, 2024
1 parent ff9eb06 commit 60c184b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/webpack-plugin/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,8 @@ try {
mpxStyleLoaderIndex = index
}
})
if (mpxStyleLoaderIndex === -1) {
// mpxStyleOptions 为 mpx style 文件的标识,避免 Vue 文件插入 styleCompiler 后导致 vue scoped 样式隔离失效
if (mpxStyleLoaderIndex === -1 && queryObj.mpxStyleOptions) {
let loaderIndex = -1
if (cssLoaderIndex > -1 && vueStyleLoaderIndex === -1) {
loaderIndex = cssLoaderIndex
Expand Down

0 comments on commit 60c184b

Please sign in to comment.