All fine when served via Vite, but when built, modules try to load from the server? #183
Replies: 1 comment
-
Ben, you are not an idiot. |
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
-
In my main code (that is all compiled down with Vite) I have:
I can happily load a component via SFC Loader, but if I try to use
import exampleComponent from 'exampleComponent'
it tries to load it in from/js/exampleComponent.js
which doesn't exist, as I essentially want to expose a set of building-block components to these runtime-imported components without having to ship the building blocks with those components.I don't have this issue when serving it via Vite, or it's obscured via Vite loading it in elsewhere perhaps...
Anyone have any ideas?
EDIT: So, I'm actually an idiot, the file it was loading when I did a build was at a different path and out of date compared to the one Vite served... and wasn't trying to loading
exampleComponent.js
but rather the full path.It's been a long week, I'll close this now
Beta Was this translation helpful? Give feedback.
All reactions