Replies: 1 comment
|
You could check this doc https://rsbuild.dev/guide/basic/static-assets#import-assets-in-css-file
IMO, I prefer https://rsbuild.dev/guide/basic/static-assets#public-folder
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is my

rsbuild.config.tsThis is my directory structure:
when i use
background-image: url('./demo-test.png');is ok in less;when i use
background-image: url('/demo.png');is error in less;The error message is
Finally, I created a new
assetsdirectory under thesrcdirectory and put thedemo.pngimage into theassetsdirectory.and used
background-image: url('@/assets/demo.png');. It works fine.Why can't I reference static resources in the public directory in the source code? What is the original intention of this design?
All reactions