Created
March 7, 2022 12:45
-
-
Save Idered/31be8ea5bf2f033ebb07c2a3ea2a8ba0 to your computer and use it in GitHub Desktop.
Revisions
-
Idered created this gist
Mar 7, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ <template> <slot :env="env" /> </template> <script setup lang="ts"> const env = computed(() => Object.entries(import.meta.env).reduce( (acc, [key, value]) => ({ ...acc, [key]: value, }), {} as ImportMetaEnv, ), ) </script>