esbuild-plugin-svgr
esbuild-plugin-svgr copied to clipboard
Cannot be marked as external
I am trying to use this plugin for SVGs used as ReactComponent with ESBuild.
I am facing The entry point "./src/assets/text.svg" cannot be marked as external
error.
Can someone help me resolve this ?
My config:
export default defineConfig({
entry: entryPoints,
sourcemap: false,
clean: true,
dts: false,
external: ["react", "react-proptypes", "~video.js/dist/video-js.min.css"],
esbuildPlugins: [
svgr({
exportType: "named"
}),
{
name: lessLoader().name,
setup: lessLoader().setup as any
}
]
});