$app/environment
import { const browser: booleantrue if the app is running in the browser.
browser, const building: booleanSvelteKit analyses your app during the build step by running it. During this process, building is true. This also applies during prerendering.
building, const dev: booleanWhether the dev server is running. This is not guaranteed to correspond to NODE_ENV or MODE.
dev, const version: stringThe value of config.kit.version.name.
version } from '$app/environment';浏览器
如果应用程序在浏览器中运行。
const 浏览器: boolean;
建筑
SvelteKit 在构建步骤中通过运行它来分析您的应用程序。在这个过程中,构建是正在进行的,true。这也适用于预渲染期间。
const building: boolean;dev
是否开发服务器正在运行。这并不保证与 NODE_ENV 或 MODE 相对应。
const dev: boolean;版本
值 of config.kit.version.name.
const 版本:string;
Edit this page on GitHub llms.txt
previous next