You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I configured alias and paths in both Vite and tsconfig, and they work fine in the browser and editor. But, when setting the data loader for the CMS, alias cannot be recognized correctly.
Error info
Failed to load D:/Code/ky/docs/src/zh/blog/[post].paths.ts:
Cannot find package '@/apis' imported from D:\Code\ky\docs\src\zh\blog\[post].paths.ts.timestamp-1736689356611-ce7eef3f0d92.mjs
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@/apis' imported from D:\Code\ky\docs\src\zh\blog\[post].paths.ts.timestamp-1736689356611-ce7eef3f0d92.mjs
at packageResolve (node:internal/modules/esm/resolve:853:9)
at moduleResolve (node:internal/modules/esm/resolve:910:20)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36)
Describe the bug
I configured alias and paths in both Vite and tsconfig, and they work fine in the browser and editor. But, when setting the data loader for the CMS, alias cannot be recognized correctly.
Error info
Reproduction
https://stackblitz.com/edit/vite-jkcw9xpt?file=docs%2Fblog%2F%5Bid%5D.paths.ts
Expected behavior
The files are successfully imported
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: