@varlet/vite-plugins 2.6.2 → 2.7.0-alpha.1673584157662

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/inlineCss.js CHANGED
@@ -7,11 +7,13 @@ export function inlineCss(options) {
7
7
  closeBundle() {
8
8
  const { cssFile, jsFile, onEnd } = options;
9
9
  if (!pathExistsSync(cssFile)) {
10
- this.error('css file cannot found');
10
+ this.warn('css file cannot found');
11
+ onEnd === null || onEnd === void 0 ? void 0 : onEnd();
11
12
  return;
12
13
  }
13
14
  if (!pathExistsSync(jsFile)) {
14
15
  this.error('js file cannot found');
16
+ onEnd === null || onEnd === void 0 ? void 0 : onEnd();
15
17
  return;
16
18
  }
17
19
  const cssCode = readFileSync(cssFile, 'utf-8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/vite-plugins",
3
- "version": "2.6.2",
3
+ "version": "2.7.0-alpha.1673584157662",
4
4
  "type": "module",
5
5
  "description": "vite plugins of varlet",
6
6
  "main": "lib/index.js",
@@ -25,7 +25,7 @@
25
25
  "fs-extra": "^9.0.1",
26
26
  "highlight.js": "^10.7.2",
27
27
  "markdown-it": "^12.2.3",
28
- "@varlet/shared": "2.6.2"
28
+ "@varlet/shared": "2.7.0-alpha.1673584157662"
29
29
  },
30
30
  "devDependencies": {
31
31
  "vite": "^4.0.4",
package/src/inlineCss.ts CHANGED
@@ -19,12 +19,14 @@ export function inlineCss(options: InlineCssOptions): Plugin {
19
19
  const { cssFile, jsFile, onEnd } = options
20
20
 
21
21
  if (!pathExistsSync(cssFile)) {
22
- this.error('css file cannot found')
22
+ this.warn('css file cannot found')
23
+ onEnd?.()
23
24
  return
24
25
  }
25
26
 
26
27
  if (!pathExistsSync(jsFile)) {
27
28
  this.error('js file cannot found')
29
+ onEnd?.()
28
30
  return
29
31
  }
30
32