fix(dev): proxy content assets to cli server
The CLI content server serves the content directory at the URL root, so images and other content assets are requested as root-relative paths (e.g. /adventures/map.png). The dev proxy only forwarded /content, so those requests fell through to historyApiFallback and the browser got index.html instead of the asset. Forward any request that maps to a real file under content/ to the CLI server, keeping /static/ bundles on the web dev server.
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
* Dev 工作流:运行 CLI 服务器并在 rsbuild 配置中设置代理
|
||||
* > npm run tttk serve ./content
|
||||
* > npm run dev
|
||||
* rsbuild 会将 /__CONTENT_INDEX.json、/__COMPLETIONS.json、/__CONTENT_REGISTRY.json、/content/ 代理到 CLI 服务器
|
||||
* rsbuild 会将 /__CONTENT_INDEX.json、/__COMPLETIONS.json、/__CONTENT_REGISTRY.json、
|
||||
* /.ttrpg 以及内容目录中的静态资源代理到 CLI 服务器
|
||||
*/
|
||||
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user