Rsbuild 2.0 loads static resources from the public folder #7628
Replies: 2 comments
-
|
This is caused by a Rspack 2.0 behavior change. In Rspack 1.x, In Rspack 2.0, If the asset needs to be referenced by source code, move it to import logo from './assets/logo.png';If you want to restore the old behavior, you can configure export default {
tools: {
rspack: {
resolve: {
roots: [import.meta.dirname],
},
},
},
}; |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
OK,非常感谢 |
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
Uh oh!
There was an error while loading. Please reload this page.
-
为什么 在 1.0x 版本中可以正常 加载 public 的静态资源 2.0 不行了?
原来可以这样 /public/image/
2.0 /public/image/ 就直接报错找不到模块
Beta Was this translation helpful? Give feedback.
All reactions