使用rsbuild报错Not allowed to load local resource #1323
-
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
通过 new URL(url, import.meta.url) 拿到的是一个 file 协议地址,Chrome 应该是不允许加载的,参考 https://support.google.com/chrome/thread/162698059/not-allowed-to-load-local-resource-how-to-fix-this?hl=en |
Beta Was this translation helpful? Give feedback.
-
试了下,新建一个vite-demo引入库开发的时候是可以的,可能跟 这个有关https://vitejs.dev/config/server-options.html#server-fs-allow |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
通过 new URL(url, import.meta.url) 拿到的是一个 file 协议地址,Chrome 应该是不允许加载的,参考 https://support.google.com/chrome/thread/162698059/not-allowed-to-load-local-resource-how-to-fix-this?hl=en