fix(css): use non-nested chunk name if facadeModule is not CSS file #15155
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
).