Skip to content

Commit

Permalink
use shorter import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 18, 2022
1 parent e5d2494 commit 0be6350
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ const nav = [
{
text: 'Help',
items: [
{ text: 'Discord Chat', link: 'https://discord.com/invite/HBherRA' },
{
text: 'Discord Chat',
link: 'https://discord.com/invite/HBherRA'
},
{ text: 'Forum', link: 'https://forum.vuejs.org/' },
{ text: 'DEV Community', link: 'https://dev.to/t/vue' }
]
Expand Down
2 changes: 0 additions & 2 deletions src/.vitepress/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/// <reference types="vitepress/client" />

declare module '*.vue' {}

declare module '@vue/theme/config' {
import { UserConfig } from 'vitepress'
const config: () => Promise<UserConfig>
Expand Down
2 changes: 1 addition & 1 deletion src/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ returnToTop: false

<script>
import { defineAsyncComponent } from 'vue'
import ReplLoading from '../.vitepress/theme/components/ReplLoading.vue'
import ReplLoading from '/@theme/components/ReplLoading.vue'

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ page: true
---

<script setup>
import NewsLetter from './.vitepress/theme/components/NewsLetter.vue'
import NewsLetter from '/@theme/components/NewsLetter.vue'
</script>

<section id="hero">
Expand Down
2 changes: 1 addition & 1 deletion src/tutorial/TutorialRepl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
onHashChange
} from '../examples/utils'
import '@vue/repl/style.css'
import PreferenceSwitch from '../.vitepress/theme/components/PreferenceSwitch.vue'
import PreferenceSwitch from '/@theme/components/PreferenceSwitch.vue'
import {
VTFlyout,
VTIconChevronLeft,
Expand Down
2 changes: 1 addition & 1 deletion src/tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ returnToTop: false

<script>
import { defineAsyncComponent } from 'vue'
import ReplLoading from '../.vitepress/theme/components/ReplLoading.vue'
import ReplLoading from '/@theme/components/ReplLoading.vue'

export default {
components: {
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"esModuleInterop": true,
"resolveJsonModule": true,
"allowJs": true,
"strict": true
"strict": true,
"baseUrl": ".",
"paths": {
"/@theme/*": ["src/.vitepress/theme/*"]
}
},
"include": ["src/**/*", "src/.vitepress/**/*"]
}

0 comments on commit 0be6350

Please sign in to comment.