Skip to content

Commit f74be74

Browse files
committed
chore: improve code
1 parent 39c547d commit f74be74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/compiler-sfc/src/rewriteDefault.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { parse, ParserPlugin } from '@babel/parser'
22
import MagicString from 'magic-string'
33

44
const defaultExportRE = /((?:^|\n|;)\s*)export(\s*)default/
5-
const namedDefaultExportRE = /((?:^|\n|;)\s*)export((.|\n)+)(?:as)?(\s*)default/
5+
const namedDefaultExportRE = /((?:^|\n|;)\s*)export([\s\S]+)(?:as)?(\s*)default/
66
const exportDefaultClassRE =
77
/((?:^|\n|;)\s*)export\s+default\s+class\s+([\w$]+)/
88

packages/shared/src/normalizeProp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function normalizeStyle(
2828

2929
const listDelimiterRE = /;(?![^(]*\))/g
3030
const propertyDelimiterRE = /:([^]+)/
31-
const styleCommentRE = /\/\*(\n|.)*?\*\//g
31+
const styleCommentRE = /\/\*[\s\S]*?\*\//g
3232

3333
export function parseStringStyle(cssText: string): NormalizedStyle {
3434
const ret: NormalizedStyle = {}

0 commit comments

Comments
 (0)