Skip to content

fix: 保持 import.meta.glob 原样,开发服可起 - #12

Merged
xxww0098 merged 1 commit into
mainfrom
fix/vite-glob
Sep 20, 2026
Merged

xxww0098 merged 1 commit into
mainfrom
fix/vite-glob

Conversation

@xxww0098

Copy link
Copy Markdown
Owner

v0.1.9 把 import.meta.glob 赋给变量再调用,Vite 无法静态替换,npm run dev 起不来。Docker/Postgres 不走这段,不影响自托管镜像。

不能写成 const glob = import.meta.glob 再调用:Vite 要求完整名字才能静态替换。
Node 测试用 NODE_TEST_CONTEXT 跳过这段。
@xxww0098
xxww0098 merged commit 997f621 into main Sep 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant