Skip to content

Commit bbefe85

Browse files
committed
fix(transform): fix transform (replace all <style> tags)
1 parent 960ecc9 commit bbefe85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transform/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const registerTransformPlugin = (nuxt: Nuxt, options: any) => {
180180

181181
function transformVueSFC (code: string, id: string) {
182182
if (id.endsWith('.vue') && !id.includes('?')) {
183-
const styleTagRe = /<style\b(.*?)\blang=['"][tj]sx?['"](.*?)>/
183+
const styleTagRe = /<style\b(.*?)\blang=['"][tj]sx?['"](.*?)>/g
184184
if (code.match(styleTagRe)) {
185185
return code.replace(styleTagRe, '<style$1lang="postcss"$2>')
186186
}

0 commit comments

Comments
 (0)