wmr icon indicating copy to clipboard operation
wmr copied to clipboard

CSS relative imports are not updated after build

Open rschristian opened this issue 4 years ago • 1 comments

CSS relative imports are currently not updated after build. If the CSS file listed in my index.html say imports a additional.css, while the style.css gets copied to dist/assets.style.<hash>.css, additional.css will not, and style.<hash>.css will have the same import, as if they were still in the same directory.

Apologies if that's word-soup, here's an example repo with a build pushed: https://github.com/rschristian/wmr-css-imports

(non-relevant files omitted)

➜  ~/Projects/css-imports tree public
public
├── additional.css
└── style.css

style.css uses @import 'additional.css'; and this works fine in dev.

➜  ~/Projects/css-imports tree dist
dist
├── additional.css
├── assets
│   └── style.6c21df40.css

While the asset path changed (no longer in the same directory), the processed path has not.

rschristian avatar Dec 15 '20 06:12 rschristian

I guess this is due to the optimize-graph plugin opting out but us not moving it into the new folder when opting out, can look into it more later this week.

JoviDeCroock avatar Feb 22 '21 23:02 JoviDeCroock