hrsh7th / webpack-asset-resource-repro

webpack issue reproducing project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Summary

When to use webpack@5.51.2, the output css (dist/css/bundle/example.css) has ../../img/example/icon.png. But if we use webpack@5.52.0, the output css has an img/example/icon.png.

webpack@5.51.2 (expected)

npm i && npm i -D webpack@5.51.2 && npm run build && cat ./project/dist/css/bundle/example.css

↓↓↓

body {
  background-image: url(../../img/bundle/example/icon.png);
}

webpack@5.52.0 (unexpected)

npm i && npm i -D webpack@5.52.0 && npm run build && cat ./project/dist/css/bundle/example.css

↓↓↓

body {
  background-image: url(img/bundle/example/icon.png);
}

About

webpack issue reproducing project.


Languages

Language:JavaScript 95.1%Language:CSS 4.9%