-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove redundant env * changeset * add meatier description * huh, cant use those in comments, they get replaced dangerously
- Loading branch information
1 parent
c2bf638
commit aa2faf3
Showing
8 changed files
with
14 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
[breaking] remove mode, prod and server from \$app/env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,11 @@ | ||
/* global __SVELTEKIT_BUILD__ */ | ||
|
||
/** | ||
* @type {import('$app/env').browser} | ||
*/ | ||
export const browser = !import.meta.env.SSR; | ||
|
||
/** | ||
* @type {import('$app/env').server} | ||
*/ | ||
export const server = !!import.meta.env.SSR; | ||
|
||
/** | ||
* @type {import('$app/env').dev} | ||
*/ | ||
export const dev = !__SVELTEKIT_BUILD__; | ||
|
||
/** | ||
* @type {import('$app/env').prod} | ||
*/ | ||
export const prod = __SVELTEKIT_BUILD__; | ||
|
||
/** | ||
* @type {import('$app/env').mode} | ||
*/ | ||
export const mode = import.meta.env.MODE; | ||
export const dev = __SVELTEKIT_DEV__; | ||
|
||
export { prerendering } from '../env.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
packages/kit/test/apps/options/source/pages/mode/index.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
<script> | ||
import { dev, mode as mode_from_import } from '$app/env'; | ||
import { dev } from '$app/env'; | ||
/** @type {string} */ | ||
export let mode_from_endpoint; | ||
</script> | ||
|
||
<h2> | ||
{mode_from_endpoint} === {mode_from_import} === {import.meta.env.MODE} === {dev | ||
? 'development' | ||
: 'custom'} | ||
{mode_from_endpoint} === {import.meta.env.MODE} === {dev ? 'development' : 'custom'} | ||
</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters