Skip to content

Commit

Permalink
fix: workaround for possible Vite bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Uninen committed Sep 25, 2021
1 parent aadb4b8 commit 2aee7b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
/// <reference types="vite/client" />

declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
interface ImportMetaEnv {
readonly VITE_APP_VERSION: string
readonly VITE_APP_BUILD_EPOCH: number
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<h3>Typed ENV Variables</h3>

<p>
Vite exposes a special <code>import.meta.env</code> object for ENV variables (see
Vite exposes a special <code>meta.env</code> object for ENV variables (see
<a href="https://vitejs.dev/guide/env-and-mode.html">official docs</a>). This template extends
that object and adds custom typed variables which you can easily use and modify to your needs.
</p>
Expand Down
5 changes: 0 additions & 5 deletions src/shims-vue.d.ts

This file was deleted.

1 comment on commit 2aee7b2

@vercel
Copy link

@vercel vercel bot commented on 2aee7b2 Sep 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.