Skip to content

Commit 7be5862

Browse files
y1d7ngShinigami92
andauthored
fix: reuse the old preprocessor after changing the lang attr (#4224)
* fix(plugin-vue): reuse the old preprocessor after changing the lang attr * feat(playground): add stylus + change lang test in vue * chore: add eol line break Co-authored-by: Shinigami <[email protected]>
1 parent f60927d commit 7be5862

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: packages/plugin-vue/src/handleHotUpdate.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ export async function handleHotUpdate({
8888
const next = nextStyles[i]
8989
if (!prev || !isEqualBlock(prev, next)) {
9090
didUpdateStyle = true
91-
const mod = modules.find((m) => m.url.includes(`type=style&index=${i}`))
91+
const mod = modules.find(
92+
(m) =>
93+
m.url.includes(`type=style&index=${i}`) &&
94+
m.url.endsWith(`.${next.lang || 'css'}`)
95+
)
9296
if (mod) {
9397
affectedModules.add(mod)
9498
} else {

0 commit comments

Comments
 (0)