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

The component js is lost after packaging. #7744

Closed
1 task
J-env opened this issue Jul 21, 2023 · 5 comments · Fixed by #8011
Closed
1 task

The component js is lost after packaging. #7744

J-env opened this issue Jul 21, 2023 · 5 comments · Fixed by #8011
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@J-env
Copy link

J-env commented Jul 21, 2023

What version of astro are you using?

2.9.0+

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

None

What package manager are you using?

npm,pnpm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Since there is so much code in the project, it is difficult to find out what is causing it.
The following is the details page after construction as an example.

/dist/detail/v5.html:

image

The component is used in the details page, but the component js is not imported in this js file.
There is no such problem in the development environment.
/dist/static-dev/hoisted.470aeb3d.js:

image

What's the expected result?

It was good before version 2.9.0

Link to Minimal Reproducible Example

none

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 21, 2023
@bluwy
Copy link
Member

bluwy commented Jul 21, 2023

Hmm It might be caused by #7707, which changes hoisted scripts detection across Astro files.

@natemoo-re natemoo-re added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Jul 21, 2023
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Jul 21, 2023
@natemoo-re
Copy link
Member

A minimal reproduction would be extremely helpful if you're able to provide one.

@tillprochaska
Copy link

I’ve been seeing the same issue. We have multiple documentation sites built using Astro and share a few common components between them.

While I haven’t had the time yet to set up a minimal reproduction example, the site is open source. Maybe that’s already helpful.

I have temporarily locked the Astro version to 2.8.5 which does not have this problem.

@sermagnus
Copy link

Same issue

@ottomated
Copy link
Contributor

The root issue here is #7857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
6 participants