@pyreon/elements 0.12.13 → 0.12.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/utils.ts CHANGED
@@ -1 +1,8 @@
1
- export const IS_DEVELOPMENT = process.env.NODE_ENV !== 'production'
1
+ // `import.meta.env.DEV` is provided by Vite/Rolldown at build time and
2
+ // literal-replaced so prod bundles tree-shake the dev branch to zero bytes.
3
+ // Typed through a narrowing interface so downstream packages don't need
4
+ // `vite/client` in their tsconfigs to type-check this file transitively.
5
+ interface ViteMeta {
6
+ readonly env?: { readonly DEV?: boolean }
7
+ }
8
+ export const IS_DEVELOPMENT: boolean = (import.meta as ViteMeta).env?.DEV === true