Skip to content

Commit

Permalink
feat: avoid emit svg files
Browse files Browse the repository at this point in the history
closes #69
  • Loading branch information
pd4d10 committed Sep 29, 2023
1 parent 6efd2d7 commit 70eead7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default function vitePluginSvgr({

return {
name: "vite-plugin-svgr",
async transform(code, id) {
enforce: "pre", // to override `vite:asset`'s behavior
async load(id) {
if (filter(id)) {
const { transform } = await import("@svgr/core");
const { default: jsx } = await import("@svgr/plugin-jsx");
Expand Down

0 comments on commit 70eead7

Please sign in to comment.