Open alexandernst opened 1 year ago
I have a scss file that looks like this:
index.scss
body { background-image: url(@src/logo.svg); }
When I build the project, the resulting css file will contain the same @src/logo.svg url, which is invalid.
@src/logo.svg
Note that I have configured esbuild and the sassPlugin to resolve @src to the correct path.
@src
Also note that a similar thing happens in the following case:
index.jsx
import Logo from "@src/logo.svg?url";
The resulting index.js file will contain @src/logo.svg (which is incorrect).
index.js
The correct behaviour would be to resolve the path to its final path. Eg, if my esbuild config is
assetNames: "[dir]/[name].[hash]",
then the url should look like /logo.8Fgx1Fgm.svg
/logo.8Fgx1Fgm.svg
I have a scss file that looks like this:
index.scss
When I build the project, the resulting css file will contain the same
@src/logo.svg
url, which is invalid.Note that I have configured esbuild and the sassPlugin to resolve
@src
to the correct path.Also note that a similar thing happens in the following case:
index.jsx
The resulting
index.js
file will contain@src/logo.svg
(which is incorrect).The correct behaviour would be to resolve the path to its final path. Eg, if my esbuild config is
then the url should look like
/logo.8Fgx1Fgm.svg