Replies: 2 comments
-
I've managed to solve the second issue by changing the vite.config.ts to explicitly change the rollup options, but the first issue still persists:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I eventually managed to figure it out - though the Vite output was complaining about line 216 of the specific file, the issue was actually on line 210. Once I solved that, everything built correctly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently trying to streamline my process by integrating Vite into my existing Hugo site, so that I can develop my React integrations without needing to do them in a different repo and manually copy them across.
All is going well when running in development mode, but I've got a couple of issues:
As a particularly annoying example, Hugo is compiling an HTML page so that it has an inline SVG, and then when Vite is running over the top of it, it's throwing that "missing whitespace" error
I've fiddled around with it a lot - initially I thought that it was complaining because it declared "stroke-width" instead of "strokeWidth" and it was trying to parse it like a jsx file, but even if I remove those attributes completely it still throws the same error.
Since I'm still a Hugo/Node/React/Vite newbie, I didn't want to raise it as a bug, as I'm not sure what to blame - is it the React plugin (I don't think so, because if I disable it in the config the issue still happens)
Is there a way to get Vite to ignore these issues, as they are invalid & I don't really care for those instances?
Whilst that does appear to work (as in, I don't get any errors) the path it constructs seems utterly mad
My repo is currently cloned to C:\Users\USERNAME\Documents\Website\website
So the app folder is structured like so:
If I run a successful build, the output folder structure is the following
Why does it resolve the non-JavaScript assets to a sensible location, but put the JavaScript file so many folders deep? Is there something I can configure to make this more reasonable?
Beta Was this translation helpful? Give feedback.
All reactions