Skip to content

Conversation

@evoactivity
Copy link
Contributor

@evoactivity evoactivity commented Feb 6, 2025

When an app provides it's own webpack css pipeline there is no reason for the default webpack config to also process css files, you can end up with multiple versions of the same file output into the build and loaded by the JS chunks (eg. renaming the css files by configuring MiniCssExtractPlugin yourself).

I'm not sure how to add a test for this, some guidance here would be helpful. Do I add a new scenario? Do I just add a test to an existing scenario?

Some documentation should be added to explain this option.

@evoactivity evoactivity changed the base branch from main to stable February 6, 2025 16:42
@evoactivity evoactivity changed the base branch from stable to main February 6, 2025 16:43
@mansona
Copy link
Member

mansona commented Feb 8, 2025

I just noticed that you're targeting main here 🙈 main Webpack support doesn't work yet and it won't work this way any more, it will have its own webpack config when we eventually release it

@evoactivity
Copy link
Contributor Author

Yeah, I switched to stable and there were 388 files in this PR 🙈. So I changed back until I had time to merge stable back in locally and push up a correct PR.

@evoactivity evoactivity force-pushed the option-to-disable-css-processing branch from 9249bff to 9cc4451 Compare February 21, 2025 15:05
@evoactivity evoactivity changed the base branch from main to stable February 21, 2025 15:05
@evoactivity evoactivity changed the title Add disableCssProcessing option for webpack Add enableInternalCssProcessing option for webpack Feb 21, 2025
@evoactivity
Copy link
Contributor Author

@mansona I've got this targeting the stable branch now.
What would be the best way to test this? I don't see any current tests for things like styleLoaderOptions, or cssLoaderOptions.

@evoactivity evoactivity marked this pull request as ready for review February 21, 2025 16:27
@NullVoxPopuli
Copy link
Collaborator

Is this still needed, given we have #2299 now?

@evoactivity
Copy link
Contributor Author

I think so, you still end up with two rules processing css files when you use a custom pipeline, doubling the workload.

@mansona
Copy link
Member

mansona commented Feb 25, 2025

I was going to suggest that we try to test this but tbh I don't think it's worth putting the effort in for something like this. If you just add some sort of documentation for this somewhere (maybe the readme?) then we should be able to merge this 👍

@mansona mansona added the bug Something isn't working label Feb 25, 2025
@evoactivity evoactivity force-pushed the option-to-disable-css-processing branch from 061c470 to 32d8f41 Compare February 25, 2025 14:34
@evoactivity
Copy link
Contributor Author

I've added documentation to the readme, the failing tests I'm pretty sure are just flaky windows issues.

@evoactivity
Copy link
Contributor Author

@mansona Anything else for me to do on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants