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

Base URL in Vite Example should be 'absolute' #12

Open
DoisKoh opened this issue Oct 15, 2024 · 1 comment
Open

Base URL in Vite Example should be 'absolute' #12

DoisKoh opened this issue Oct 15, 2024 · 1 comment

Comments

@DoisKoh
Copy link

DoisKoh commented Oct 15, 2024

If you don't add a slash in front, it will attempt to import the assets relative to the current URL pathname.

https://github.com/CesiumGS/cesium-vite-example/blob/main/vite.config.js#L7

The example should add the slash in front, and/or explain this limitation.

@jjspace
Copy link
Contributor

jjspace commented Oct 15, 2024

I'm confused at the issue here. We do add a slash at the beginning of the base url when built with Vite.

CESIUM_BASE_URL: JSON.stringify(`/${cesiumBaseUrl}`),

Did you have problems running this until you changed that line? Could you provide steps to reproduce?

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

No branches or pull requests

2 participants