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
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is my

rsbuild.config.ts
This 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
assets
directory under thesrc
directory and put thedemo.png
image into theassets
directory.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?
Beta Was this translation helpful? Give feedback.
All reactions