Expected Behavior
The output of Rollup v2.50.1, which makes CSS code-splitting with static CSS outputs possible.
Actual Behavior
Since Rollup v2.50.2 (still the same in the recent v2.51.0 release), the CSS code-splitting doesn't work. The CSS code is duplicated between outputs and the static assets overwrite each others.
I traced the change to PR #4104 and this new "if" condition in particular :
|
if (dependency instanceof ExternalModule || dependency.isIncluded()) { |
|
relevantDependencies.add(dependency); |
|
} |
The modules are not external, so I think the issue is with isIncluded() and effectively the ast.included and namespace.included booleans are false in my logs.
Unfortunately, this is where my knowledge ends. The question is, should "rollup-plugin-styles" change something or should the lines above be changed ? ... and why (just curious) ?
I am not the maintainer of "rollup-plugin-styles", but I do use it in my frontend framework project (GladeJS).
I know this is on the hackish-side of Rollup usage, but I was about to release my CSS code-splitting feature. 😇
Expected Behavior
The output of Rollup v2.50.1, which makes CSS code-splitting with static CSS outputs possible.
Actual Behavior
Since Rollup v2.50.2 (still the same in the recent v2.51.0 release), the CSS code-splitting doesn't work. The CSS code is duplicated between outputs and the static assets overwrite each others.
I traced the change to PR #4104 and this new "if" condition in particular :
rollup/src/Module.ts
Lines 368 to 370 in 592b9fe
The modules are not external, so I think the issue is with
isIncluded()and effectively theast.includedandnamespace.includedbooleans arefalsein my logs.Unfortunately, this is where my knowledge ends. The question is, should "rollup-plugin-styles" change something or should the lines above be changed ? ... and why (just curious) ?
I am not the maintainer of "rollup-plugin-styles", but I do use it in my frontend framework project (GladeJS).
I know this is on the hackish-side of Rollup usage, but I was about to release my CSS code-splitting feature. 😇