Skip to content
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

can't import public/ files with / path #18

Closed
andylacko opened this issue Jan 19, 2022 · 2 comments
Closed

can't import public/ files with / path #18

andylacko opened this issue Jan 19, 2022 · 2 comments

Comments

@andylacko
Copy link

[plugin:vite:svgr] ENOENT: no such file or directory, open '/logo.svg'

only works with

../public/logo.svg

@pd4d10
Copy link
Owner

pd4d10 commented Feb 1, 2022

According to the Vite doc here, the publicDir is to serve as plain static assets, which should not be transformed.

So in you case I guess it's better to place it into the src

@andylacko
Copy link
Author

🤷🏻‍♂️, we solved it that way, It makes sense, when you minify your assets

Thx for answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants