@dimina/compiler 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,7 +89,9 @@ async function enhanceCSS(module2) {
|
|
|
89
89
|
if (compileRes.has(absolutePath)) {
|
|
90
90
|
return compileRes.get(absolutePath);
|
|
91
91
|
}
|
|
92
|
-
const fixedCSS = inputCSS.replace(/@import
|
|
92
|
+
const fixedCSS = inputCSS.replace(/@import[^;\n]*$/gm, (match) => {
|
|
93
|
+
return match.endsWith(";") ? match : `${match};`;
|
|
94
|
+
});
|
|
93
95
|
const ast = postcss.parse(fixedCSS);
|
|
94
96
|
const promises = [];
|
|
95
97
|
ast.walk(async (node) => {
|
|
@@ -88,7 +88,9 @@ async function enhanceCSS(module) {
|
|
|
88
88
|
if (compileRes.has(absolutePath)) {
|
|
89
89
|
return compileRes.get(absolutePath);
|
|
90
90
|
}
|
|
91
|
-
const fixedCSS = inputCSS.replace(/@import
|
|
91
|
+
const fixedCSS = inputCSS.replace(/@import[^;\n]*$/gm, (match) => {
|
|
92
|
+
return match.endsWith(";") ? match : `${match};`;
|
|
93
|
+
});
|
|
92
94
|
const ast = postcss.parse(fixedCSS);
|
|
93
95
|
const promises = [];
|
|
94
96
|
ast.walk(async (node) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimina/compiler",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "星河编译工具",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"@babel/types": "^7.27.1",
|
|
51
51
|
"@vue/compiler-sfc": "^3.5.14",
|
|
52
52
|
"autoprefixer": "^10.4.21",
|
|
53
|
-
"cheerio": "1.0.0
|
|
54
|
-
"chokidar": "^
|
|
55
|
-
"commander": "^
|
|
56
|
-
"cssnano": "^
|
|
57
|
-
"esbuild": "^0.
|
|
58
|
-
"htmlparser2": "^
|
|
53
|
+
"cheerio": "^1.0.0",
|
|
54
|
+
"chokidar": "^4.0.3",
|
|
55
|
+
"commander": "^14.0.0",
|
|
56
|
+
"cssnano": "^7.0.7",
|
|
57
|
+
"esbuild": "^0.25.4",
|
|
58
|
+
"htmlparser2": "^10.0.0",
|
|
59
59
|
"listr2": "^8.3.3",
|
|
60
60
|
"postcss": "^8.5.3",
|
|
61
|
-
"postcss-selector-parser": "^
|
|
62
|
-
"shelljs": "^0.
|
|
61
|
+
"postcss-selector-parser": "^7.1.0",
|
|
62
|
+
"shelljs": "^0.10.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"registry": "https://registry.npmjs.org/"
|