Skip to content

Commit

Permalink
fix(plugin-vue): reuse the old preprocessor after changing the lang attr
Browse files Browse the repository at this point in the history
  • Loading branch information
y1d7ng committed Jul 12, 2021
1 parent eb39853 commit 0c276f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/plugin-vue/src/handleHotUpdate.ts
Expand Up @@ -88,7 +88,11 @@ export async function handleHotUpdate({
const next = nextStyles[i]
if (!prev || !isEqualBlock(prev, next)) {
didUpdateStyle = true
const mod = modules.find((m) => m.url.includes(`type=style&index=${i}`))
const mod = modules.find(
(m) =>
m.url.includes(`type=style&index=${i}`) &&
m.url.endsWith(`.${next.lang || 'css'}`)
)
if (mod) {
affectedModules.add(mod)
} else {
Expand Down

0 comments on commit 0c276f9

Please sign in to comment.