-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Vite server 500 crash when using VitePluginHelper.asset
with concatenated string
#455
Comments
Edit: just realized this is due to: but when I put in a full string url the problem does indeed go away... How can we accomplish this? |
Thanks for reporting! Can you provide a reproducible repo? |
Hi hmsk, I'm not able to start another vite project at the moment, but above I identified the issue as resulting from the lack of string concatenation support. If anyone else runs into this cryptic error, make sure you're only using full string literals to specify your asset paths. I left the issue open in case anyone knows how we can get concatenation working, which is important in Elm for reusable functions -- e.g. if I have a button fn that sets the button icon based on its inputs, you may want to pass in something like "airplane" to the reusable function to specify the icon -- not |
VitePluginHelper.asset
with concatenated string
Thanks for giving the additional detail! I don't know if we can make concatenation possible technically, but at least wanna try to avoid the crash and give a proper guide/warning. |
When I go to add
VitePluginHelper.asset
to my svg path strings in Elm, the server no longer works, and vite crashes with:But as soon as I take it out and leave it as a plain string, it works fine again.
The text was updated successfully, but these errors were encountered: