vite-plugin-svg-sprite 0.3.0 → 0.3.1

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/es/index.js CHANGED
@@ -23,7 +23,7 @@ export default (options) => {
23
23
  if (svgoOptions !== false) {
24
24
  const result = (optimize(code, svgoOptions === true ? undefined : svgoOptions));
25
25
  if (result.error != null) {
26
- throw result.error;
26
+ throw new Error(result.error);
27
27
  }
28
28
  code = result.data;
29
29
  }
package/lib/index.js CHANGED
@@ -28,7 +28,7 @@ exports.default = (options) => {
28
28
  if (svgoOptions !== false) {
29
29
  const result = ((0, svgo_1.optimize)(code, svgoOptions === true ? undefined : svgoOptions));
30
30
  if (result.error != null) {
31
- throw result.error;
31
+ throw new Error(result.error);
32
32
  }
33
33
  code = result.data;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-svg-sprite",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "SVG sprite plugin for Vite",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "eslint-config-airbnb-typescript": "^12.0.0",
43
43
  "eslint-plugin-import": "^2.22.1",
44
44
  "typescript": "^4.1.2",
45
- "vite": "^3.1.0"
45
+ "vite": "^4.0.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "micromatch": "^4.0.2",
@@ -50,6 +50,6 @@
50
50
  "svgo": "^2.8.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "vite": "^2 || ^3"
53
+ "vite": "^2 || ^3 || ^4"
54
54
  }
55
55
  }
package/src/index.ts CHANGED
@@ -35,7 +35,7 @@ export default (options?: SvgSpriteOptions) => {
35
35
  if (svgoOptions !== false) {
36
36
  const result = (optimize(code, svgoOptions === true ? undefined : svgoOptions));
37
37
  if (result.error != null) {
38
- throw result.error;
38
+ throw new Error(result.error);
39
39
  }
40
40
  code = result.data;
41
41
  }