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

Support "base" config of Vite or alternatives #243

Open
berlysia opened this issue Dec 27, 2024 · 1 comment
Open

Support "base" config of Vite or alternatives #243

berlysia opened this issue Dec 27, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@berlysia
Copy link
Contributor

What is the feature you are proposing?

When client code is present, it is not possible to deploy a site built with HonoX to GitHub Pages.

When deploying a site built with Vite to GitHub Pages, it is instructed to change the base setting.
Behavior for embedded deployments is also provided.

FYI: My workaround and considerations:

  • vite.config.js cannot be read from runtime, so I could not directly tell the Script component the value of base. And the Script component uses "/", so it is not configurable.
  • I have implemented my own Script component equivalent to get around this, but there may be a better way to do it.
    • The base value is shared by environment variables.
@berlysia berlysia added the enhancement New feature or request label Dec 27, 2024
@yusukebe
Copy link
Member

Hi @berlysia

I don't understand your problem 100%, but will it be resolved if you change the path /dist/.vite/manifest.json in this line?

const MANIFEST = import.meta.glob<{ default: Manifest }>('/dist/.vite/manifest.json', {

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

No branches or pull requests

2 participants