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

Wrong env-config.js src when using base URL #37

Closed
frabera opened this issue Aug 30, 2023 · 3 comments · Fixed by #38
Closed

Wrong env-config.js src when using base URL #37

frabera opened this issue Aug 30, 2023 · 3 comments · Fixed by #38
Labels

Comments

@frabera
Copy link

frabera commented Aug 30, 2023

Hello,
Thank you for your plugin. I just found a problem when using it in Vite projects when setting the base URL config.
The plugin adds the following line to the html entrypoint:
<script src="/env-config.js"></script>

The problem is that when using a base url with Vite, it is not prepended to the URL, i.e.:

defineConfig({
base: "/sub/path"
})

the correct injection should be:
<script src="/sub/path/env-config.js"></script>

But Vite doesn't prepend it as usual (maybe it is injected after the vite html processing?)

How can it be solved? Thanks.

@github-actions
Copy link

🎉 This issue has been resolved in version 4.0.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lukashass
Copy link
Member

Hey @frabera, I added support for the vite base path in version 4.0.12.

Does that solve your issue?

@frabera
Copy link
Author

frabera commented Sep 1, 2023

@lukashass Yes, thank you very much!

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

Successfully merging a pull request may close this issue.

2 participants