@varlet/vite-plugins 3.3.1 → 3.3.2
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.
- package/lib/index.js +4 -2
- package/package.json +2 -2
- package/src/inlineCss.ts +4 -2
package/lib/index.js
CHANGED
|
@@ -128,10 +128,12 @@ function inlineCss(options) {
|
|
|
128
128
|
closeBundle() {
|
|
129
129
|
const { cssFile, jsFile, onEnd } = options;
|
|
130
130
|
if (!pathExistsSync(cssFile)) {
|
|
131
|
-
this.
|
|
131
|
+
this.warn("css file cannot found");
|
|
132
|
+
return;
|
|
132
133
|
}
|
|
133
134
|
if (!pathExistsSync(jsFile)) {
|
|
134
|
-
this.
|
|
135
|
+
this.warn("js file cannot found");
|
|
136
|
+
return;
|
|
135
137
|
}
|
|
136
138
|
const cssCode = readFileSync(cssFile, "utf-8");
|
|
137
139
|
const jsCode = readFileSync(jsFile, "utf-8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/vite-plugins",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "vite plugins of varlet",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"highlight.js": "^10.7.2",
|
|
27
27
|
"markdown-it": "^12.2.3",
|
|
28
28
|
"pinyin-pro": "3.17.0",
|
|
29
|
-
"@varlet/shared": "3.3.
|
|
29
|
+
"@varlet/shared": "3.3.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/ejs": "^3.1.1",
|
package/src/inlineCss.ts
CHANGED
|
@@ -19,11 +19,13 @@ export function inlineCss(options: InlineCssOptions): Plugin {
|
|
|
19
19
|
const { cssFile, jsFile, onEnd } = options
|
|
20
20
|
|
|
21
21
|
if (!pathExistsSync(cssFile)) {
|
|
22
|
-
this.
|
|
22
|
+
this.warn('css file cannot found')
|
|
23
|
+
return
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
if (!pathExistsSync(jsFile)) {
|
|
26
|
-
this.
|
|
27
|
+
this.warn('js file cannot found')
|
|
28
|
+
return
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
const cssCode = readFileSync(cssFile, 'utf-8')
|