-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Respect Vite's "server.origin" option. #568
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I noticed that while running Vite's dev server, URLs for images generated by
vite-imagetools
are relative (i.e./@imagetools/c224b1fb8dcc644a0adf403cda4d43b3390bbf1f
). For the most part, this is fine, but as soon as you're integrating with the backend, these relative paths break images.Vite has
server.origin
option specifically for these cases: https://vitejs.dev/config/server-options.html#server-originIt's also explained in the "Backend Integration" section in their docs: https://vitejs.dev/guide/backend-integration.html:
Right now the only way to work with
vite-imagetools
while the app is integrated with any backend is to rewrite URLs server-side (Apache, NGINX).It would be nice if
vite-imagetools
would respectserver.origin
option and we could stop hardcoding those rewrite rules.The text was updated successfully, but these errors were encountered: