Skip to content

Commit

Permalink
Specify SVG-s path in plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
makaroni4 committed Dec 30, 2023
1 parent 8f42d8a commit 429d1e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
declare module '*.svg' {
const content: React.FC<React.SVGProps<SVGElement>>
export default content
import * as React from 'react';

const ReactComponent: React.FunctionComponent<React.ComponentProps<'svg'> & { title?: string }>;

export default ReactComponent;
}

/// <reference types="vite/client" />
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import svgr from "vite-plugin-svgr";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
svgr(),
svgr({ include: '**/*.svg' }),
react()
],
})

0 comments on commit 429d1e6

Please sign in to comment.