- update dependencies

- add example env and mode test (staging)
- add shims-vue.d.ts (define ts file in vue files)
This commit is contained in:
2021-12-28 18:28:03 +09:00
parent c753b14826
commit 7bc3379768
8 changed files with 367 additions and 364 deletions

9
src/env.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_TEST: string
}
interface ImportMeta {
readonly env: ImportMetaEnv
}

View File

@@ -6,6 +6,9 @@ const go = () => {
if (name.value)
router.push(`/hi/${encodeURIComponent(name.value)}`)
}
const testEnv = import.meta.env.VITE_TEST
const initNum = 1
</script>
<template>
@@ -21,11 +24,12 @@ const go = () => {
</p>
<div py-4 />
<Counter :initial="initNum" />
<div py-4 />
<input
id="input"
v-model="name"
placeholder="What's your name?"
:placeholder="testEnv"
type="text"
autocomplete="false"
p="x-4 y-2"

5
src/shims-vue.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}