d038721
22 days ago (edited)
When trying to reference a background image in a separate css file that is imported in the app or a component the resulting path that esbuild generates for the image gives 404: can't be found.
To reproduce:
Create a css file in your app
copy some png or svg to your app
import the css file in one of your app's components
in that component create a div with className test-bg and some text inside so that it gets width and height
in the css file create a rule for .test-bg and add background: url(path-to-your-test-image)
If you run your app the test div won't have a background image and if you open dev tools and look at the output for the class test-bg the line with the background:... statement should show a 404 for the referenced image.
d038721 22 days ago (edited) When trying to reference a background image in a separate css file that is imported in the app or a component the resulting path that esbuild generates for the image gives 404: can't be found.
To reproduce:
Create a css file in your app copy some png or svg to your app import the css file in one of your app's components in that component create a div with className test-bg and some text inside so that it gets width and height in the css file create a rule for .test-bg and add background: url(path-to-your-test-image) If you run your app the test div won't have a background image and if you open dev tools and look at the output for the class test-bg the line with the background:... statement should show a 404 for the referenced image.