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

bug: styleUrls only including the first file listed #5016

Closed
3 tasks done
dgibson666 opened this issue Nov 2, 2023 · 2 comments · Fixed by #5131
Closed
3 tasks done

bug: styleUrls only including the first file listed #5016

dgibson666 opened this issue Nov 2, 2023 · 2 comments · Fixed by #5131
Assignees
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@dgibson666
Copy link

dgibson666 commented Nov 2, 2023

Prerequisites

Stencil Version

4.7

Current Behavior

In Stencil 4.6 and 4.7, Only the first stylesheet in styleUrls is being included in the component CSS. I'm not using modes (per the similar open issue), just trying to reference multiple stylesheets that were generated from a separate build process - all placed in the component directory.

If I replace this with a single styleUrl (that's .scss), referencing those same multiple .scss files via @use, it loads them all correctly.

Expected Behavior

Add all CSS specified in the styleUrls array to the component and DOM, not just the first.

System Info

System: node 18.18.2
    Platform: windows (10.0.22621)
   CPU Model: 13th Gen Intel(R) Core(TM) i7-13700F (24 cpus)
    Compiler: C:\websites\_sandbox\[projectname]\node_modules\@stencil\core\compiler\stencil.js
       Build: 1698677754
     Stencil: 4.7.0
  TypeScript: 5.2.2
      Rollup: 2.42.3
      Parse5: 7.1.2
      Sizzle: 2.42.3
      Terser: 5.22.0

Steps to Reproduce

@Component({
  tag: 'my-component',
  styleUrls: ['reset.scss', 'roboto.scss', 'css-variables.scss', 'core.scss'] // doesn't work.
  styleUrl: 'all-css.scss' // works loading all the same files via @use

Code Reproduction URL

https://github.com/

Additional Information

This is pretty straight forward, no time to make a repo to demo it.

@ionitron-bot ionitron-bot bot added the triage label Nov 2, 2023
@rwaskiewicz rwaskiewicz self-assigned this Nov 6, 2023
@rwaskiewicz rwaskiewicz added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Nov 6, 2023
@rwaskiewicz rwaskiewicz removed their assignment Nov 6, 2023
@christian-bromann christian-bromann self-assigned this Nov 20, 2023
@alicewriteswrongs
Copy link
Contributor

put together a quick repro: https://github.com/alicewriteswrongs/style-urls-repro

christian-bromann added a commit that referenced this issue Dec 4, 2023
This reverts commit cf4a701.

fixes: #5016
STENCIL-999

improve tests

more e2e tests
christian-bromann added a commit that referenced this issue Dec 5, 2023
This reverts commit cf4a701.

fixes: #5016
STENCIL-999

improve tests

more e2e tests
christian-bromann added a commit that referenced this issue Dec 6, 2023
christian-bromann added a commit that referenced this issue Dec 6, 2023
christian-bromann added a commit that referenced this issue Dec 6, 2023
christian-bromann added a commit that referenced this issue Dec 6, 2023
christian-bromann added a commit that referenced this issue Dec 6, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 6, 2023
@christian-bromann
Copy link
Member

christian-bromann commented Dec 11, 2023

A fix for this issue was released in v4.8.2. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants