mini-css-extract-plugin icon indicating copy to clipboard operation
mini-css-extract-plugin copied to clipboard

mini-css-extract-plugin >= 2.9.0 will prefetch initial css chunk unexpected

Open 992429169 opened this issue 10 months ago • 1 comments

Bug report

mini-css-extract-plugin >= 2.9.0 will prefetch initial css chunk unexpected

Actual Behavior

Image Image

Expected Behavior

there is no need to prefetch this chunk, because it's a initial chunk

How Do We Reproduce?

git clone https://github.com/992429169/problem-reproduce
cd problem-reproduce
npm i
npm run dev

start a server and visit index.html i also give a fix patch in this repo

Please paste the results of npx webpack-cli info here, and mention other relevant information

992429169 avatar Jan 22 '25 08:01 992429169

Hello, sorry for delay, I can reproduce it with common chunk, but I can't reproduce it with undefined, can you improve your steps, thanks?

alexander-akait avatar Feb 14 '25 21:02 alexander-akait

I ran into the same problem. The issue was resolved when I disabled SplitChunks, suggesting the plugin may have some unhandled edge cases.

oklqh avatar Jul 24 '25 03:07 oklqh

@oklqh Can you provide reproducible test repo too?

alexander-akait avatar Jul 25 '25 11:07 alexander-akait