Skip to content

Commit 70eead7

Browse files
committed
feat: avoid emit svg files
closes #69
1 parent 6efd2d7 commit 70eead7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export default function vitePluginSvgr({
2222

2323
return {
2424
name: "vite-plugin-svgr",
25-
async transform(code, id) {
25+
enforce: "pre", // to override `vite:asset`'s behavior
26+
async load(id) {
2627
if (filter(id)) {
2728
const { transform } = await import("@svgr/core");
2829
const { default: jsx } = await import("@svgr/plugin-jsx");

0 commit comments

Comments
 (0)