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

Astro.glob() and import.meta.glob() breaks client side JS components #5629

Closed
1 task
pilcrowonpaper opened this issue Dec 18, 2022 · 1 comment
Closed
1 task

Comments

@pilcrowonpaper
Copy link
Contributor

pilcrowonpaper commented Dec 18, 2022

What version of astro are you using?

1.7.1

Are you using an SSR adapter? If so, which one?

none

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

Issue from 1.7.0. No issue <=1.6.15.

The chunk directory used by JS components (Solid, Svelte, etc) is not being generated on build step when Astro.glob() or import.meta.glob() is used, causing 404 errors in the browser:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (web.6fe5bcb6.js, line 0)

Additionally, the build command does not throw any error messages:

> [email protected] build
> astro build

01:56:58 PM [build] output target: static
01:56:58 PM [build] Collecting build info...
01:56:58 PM [build] Completed in 22ms.
01:56:58 PM [build] Building static entrypoints...
01:56:59 PM [build] Completed in 1.13s.

 building client 
Completed in 140ms.


 generating static routes 
▶ src/pages/index.astro
  └─ /index.html (+15ms)
Completed in 19ms.

01:56:59 PM [build] 1 page(s) built in 1.32s
01:56:59 PM [build] Complete!

Tested with Svelte and Solid.

Link to Minimal Reproducible Example

https://github.com/pilcrowOnPaper/astro-chunk-repro

Participation

  • I am willing to submit a pull request for this issue.
@pilcrowonpaper pilcrowonpaper changed the title Astro.glob() or import.meta.glob() breaks client side JS components Astro.glob() and import.meta.glob() breaks client side JS components Dec 18, 2022
@pilcrowonpaper
Copy link
Contributor Author

Seems to be resolved with [email protected]

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

1 participant