fix(cli): should not replace style entry import ext (#8301)

This commit is contained in:
neverland
2021-03-08 09:36:49 +08:00
committed by GitHub
parent 1af04d43d9
commit 3144a63d2b
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ export function getCssBaseFile() {
const IMPORT_STYLE_RE = /import\s+?(?:(?:".*?")|(?:'.*?'))[\s]*?(?:;|$|)/g;
// "import 'a.less';" => "import 'a.css';"
export function replaceCssImportExt(code: string) {
export function replaceCSSImportExt(code: string) {
return code.replace(IMPORT_STYLE_RE, (str) =>
str.replace(`.${CSS_LANG}`, '.css')
);