How can I include .svg files in build? #811
danigalvez
started this conversation in
General
Replies: 3 comments 4 replies
-
CC @egoist |
Beta Was this translation helpful? Give feedback.
0 replies
-
@danigalvez did you find any solution? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I ended up running into this and figuring it out – turns out the import { defineConfig } from 'tsup'
import svgr from 'esbuild-plugin-svgr'
import jsx from '@svgr/plugin-jsx';
export default defineConfig({
esbuildPlugins: [svgr({ svgo: false, plugins: [jsx] })],
}); I figured it out by checking out how the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a component that dynamically imports SVGs, so I'll need to be able to include these SVGs within the build. How can I do this?
Here's what I've tried:
I've scoured the internet to no avail, everythign leads me to webpack and rollup material. I'd love to stay with
tsup
, however.Beta Was this translation helpful? Give feedback.
All reactions