@varlet/vite-plugins 3.1.4 → 3.2.0-alpha.1711119852830

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 CHANGED
@@ -128,14 +128,10 @@ function inlineCss(options) {
128
128
  closeBundle() {
129
129
  const { cssFile, jsFile, onEnd } = options;
130
130
  if (!pathExistsSync(cssFile)) {
131
- this.warn("css file cannot found");
132
- onEnd?.();
133
- return;
131
+ this.error("css file cannot found");
134
132
  }
135
133
  if (!pathExistsSync(jsFile)) {
136
134
  this.error("js file cannot found");
137
- onEnd?.();
138
- return;
139
135
  }
140
136
  const cssCode = readFileSync(cssFile, "utf-8");
141
137
  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.1.4",
3
+ "version": "3.2.0-alpha.1711119852830",
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.1.4"
29
+ "@varlet/shared": "3.2.0-alpha.1711119852830"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/ejs": "^3.1.1",
package/src/inlineCss.ts CHANGED
@@ -19,15 +19,11 @@ export function inlineCss(options: InlineCssOptions): Plugin {
19
19
  const { cssFile, jsFile, onEnd } = options
20
20
 
21
21
  if (!pathExistsSync(cssFile)) {
22
- this.warn('css file cannot found')
23
- onEnd?.()
24
- return
22
+ this.error('css file cannot found')
25
23
  }
26
24
 
27
25
  if (!pathExistsSync(jsFile)) {
28
26
  this.error('js file cannot found')
29
- onEnd?.()
30
- return
31
27
  }
32
28
 
33
29
  const cssCode = readFileSync(cssFile, 'utf-8')