svg as ReactComponent support
This commit is contained in:
parent
290a6a5c5a
commit
99b233910d
|
|
@ -0,0 +1,6 @@
|
|||
declare module '*.svg' {
|
||||
import React = require('react');
|
||||
export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
||||
const src: string;
|
||||
export default src;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -18,7 +18,8 @@
|
|||
"react-router-dom": "^6.7.0",
|
||||
"react-spinners": "^0.13.8",
|
||||
"sass": "^1.57.1",
|
||||
"uuid": "^9.0.0"
|
||||
"uuid": "^9.0.0",
|
||||
"vite-plugin-svgr": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.0.26",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@
|
|||
"noEmit": true,
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "custom.d.ts"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import svgr from 'vite-plugin-svgr';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
})
|
||||
plugins: [svgr(), react()],
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue