Skip to content

Commit 8e0c11b

Browse files
committed
Use named export instead of default export for better esm/cjs interop. Closes #2 [publish]
1 parent 78079ba commit 8e0c11b

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.2.0
4+
5+
Breaking: Use named export instead of default export for better esm/cjs interop. Closes #2
6+
7+
To migrate, replace your import by `import { svgPlugin } from "vite-plugin-fast-react-svg";`
8+
39
## 0.1.4
410

511
Add vite@3 to peer dependency range

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In your vite config:
1818

1919
```ts
2020
import { defineConfig } from "vite";
21-
import svgPlugin from "vite-plugin-fast-react-svg";
21+
import { svgPlugin } from "vite-plugin-fast-react-svg";
2222

2323
export default defineConfig({
2424
plugins: [svgPlugin()],

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vite-plugin-fast-react-svg",
33
"description": "Turn SVG into React components, without Babel",
4-
"version": "0.1.4",
4+
"version": "0.2.0",
55
"license": "MIT",
66
"author": "Arnaud Barré (https://github.com/ArnaudBarre)",
77
"main": "dist/index.js",

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { readFileSync } from "fs";
22
import { transform } from "esbuild";
33
import { Plugin } from "vite";
44

5-
export default function svgPlugin(): Plugin {
5+
export function svgPlugin(): Plugin {
66
return {
77
name: "svg",
88
enforce: "pre",

0 commit comments

Comments
 (0)