-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
fix(css): use non-nested chunk name if facadeModule is not CSS file #15155
fix(css): use non-nested chunk name if facadeModule is not CSS file #15155
Conversation
Do you mean the current behaviour is the former, and this PR changes to the latter instead? If I'm reading the PR right. I tested the linked issues and it seems to not regress them, in which case if the only change is
Then I think we can fix this so it returns to the behaviour as before. I think we could fix this as a patch since this output shouldn't be explicitly relied upon before. |
I also think it is a good idea to get back to the previous behavior. I think it is less surprising that imported CSS works in the same way, no matter if they are imported from an entry or not (comment). So we keep the special handling only for entries. It would be good if SvelteKit wouldn't depend on this though in the future. |
Oops. Yes 😅 |
I don't think we do, but it was the issue fixed in #15154 which was causing us trouble. Now that it's fixed hopefully we don't depend on this anymore. |
playground/backend-integration/__tests__/backend-integration.spec.ts
Outdated
Show resolved
Hide resolved
/ecosystem-ci run |
📝 Ran ecosystem CI on
|
Description
#14945 changed the CSS chunk names to respect chunk name correctly.
That fixed the following cases:
build.rollupOptions.input
(e.g.build.rollupOptions.input: { 'css/foo.css': 'css/foo.css' }
) (Allow to specify filename of emitted CSS whenbuild.cssCodeSplit: false
#4863 (comment))build.rollupOptions.output.preserveModules: true
is set (Some problems with cssCodeSplit and Library Mode #8057, The css file is not generated into the corresponding directory #12072)But this also changed the CSS chunk name when a nested JS entry chunk imports a CSS chunk. For example,
In this case, some people would want the CSS file to be output under
nested
directory, while others would want the CSS file to be output withoutnested
directory.The current behavior is the latter one, and this PR changes to the former one. But I'm not sure which is better. 🤔
refs #14945
refs #15141
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).