$env/static/public
与 $env/static/private 类似,不同之处在于它仅包含以 config.kit.env.publicPrefix(默认为 PUBLIC_)开头的环境变量,因此可以安全地暴露给客户端代码。
¥Similar to $env/static/private, except that it only includes environment variables that begin with config.kit.env.publicPrefix (which defaults to PUBLIC_), and can therefore safely be exposed to client-side code.
值在构建时被静态替换。
¥Values are replaced statically at build time.
import { import PUBLIC_BASE_URLPUBLIC_BASE_URL } from '$env/static/public';上一页 下一页