-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Works in dev build but VueComponent export is missing in production build, causing build failure #7
Comments
Attempted Fixes:
Fix: Downgrading to Vite 1.0.0-beta.12 (or rc.3)Downgrading does seem to work (you can complete a production build and the SVG appears on serving that built app). UPDATE: I got tripped up by npm version specifiers. Looks like I can production build right up until vite 1.0.0-rc.4. So issue must be between rc.3 and rc.4. It would be good to update this to work against the latest release candidate (rc.4). I'll keep looking for the issue now that I narrowed it down but I'm not very familiar with vite yet. |
@RegisFrey I just released |
Yes, looks like it builds with rc 4 and the updated vite-plugin-svg@0.7.0. Thank you. |
Referencing it as a js property worked for me: |
Sample project: https://github.com/RegisFrey/vite-svg-error
Reproduction
yarn create vite-app
)vite.config.ts
yarn dev
and see the SVG + "hello world" text visible at localhost:3000yarn build
(production build with rollup) but it errors on the SVG import.The text was updated successfully, but these errors were encountered: