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

InlineStylesheets: 'never' is invalid for the styles and scripts generated by Astro islands #12395

Open
1 task done
shiheme opened this issue Nov 7, 2024 · 2 comments
Open
1 task done
Labels
needs triage Issue needs to be triaged

Comments

@shiheme
Copy link

shiheme commented Nov 7, 2024

Astro Info

build: {
    inlineStylesheets: "always",
  },

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I used inline Stylesheets: 'never', which seems to be ineffective for the styles and scripts generated by Astro islands. There is still a lot of code appearing on the current page

What's the expected result?

Is there a solution to prevent the page from having a lot of introverted styles and scripts?

Link to Minimal Reproducible Example

https://stackblitz.com/edit/2014-test-astro-islands?file=package.json,src%2Fstyles%2Fglobals.css,src%2Flayouts%2FLayout.astro,astro.config.mjs,tsconfig.json,src%2Fcomponents%2Fdemo.jsx,src%2Fpages%2Findex.astro&title=Astro%20Starter%20Kit:%20Basics

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 Nov 7, 2024
@apatel369
Copy link
Contributor

@shiheme Please add a valid reproduction link.

@shiheme
Copy link
Author

shiheme commented Nov 8, 2024

I have added a reproduction link. I am using shadcn/ui to add client: * as an interactive component. Can CSS and JavaScript be stored in one file for reference in the built code? Otherwise, a large amount of code will make people feel that the code is bloated
image

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

No branches or pull requests

2 participants