compiled icon indicating copy to clipboard operation
compiled copied to clipboard

[webpack] Atomic stylesheet isn't optimized unless it ends in "compiled-css.css"

Open itsdouges opened this issue 4 years ago • 0 comments

Suspect code is here https://github.com/atlassian-labs/compiled/blob/master/packages/webpack-loader/src/extract-plugin.tsx#L25

We want to identify the CSS asset so we only optimize the "compiled css" one. We use cache groups to force the styles into a single group (see: https://github.com/atlassian-labs/compiled/blob/master/packages/webpack-loader/src/extract-plugin.tsx#L39).

Optimization falls over when the name is [contenthash].css or the like, because now we can't identify what the cache group is.

What could a potential fix be?

itsdouges avatar Mar 30 '21 08:03 itsdouges