Skip to content

Commit bf80fb8

Browse files
authored
fix: improve css regex for preprocessors (#18)
1 parent 449e07f commit bf80fb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const IS_JS_RE = /\.[cm]?js(\?[^.]+)?$/
22
const IS_MODULE_RE = /\.mjs(\?[^.]+)?$/
33
const HAS_EXT_RE = /[^./]+\.[^./]+$/
4-
const IS_CSS_RE = /\.css(\?[^.]+)?$/
4+
const IS_CSS_RE = /\.(css|postcss|sass|scss|less|stylus|styl)(\?[^.]+)?$/
55

66
export function isJS (file: string) {
77
return IS_JS_RE.test(file) || !HAS_EXT_RE.test(file)

0 commit comments

Comments
 (0)