diff --git a/components.d.ts b/components.d.ts new file mode 100644 index 0000000..a98662d --- /dev/null +++ b/components.d.ts @@ -0,0 +1,13 @@ +/* eslint-disable */ +// @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 +export {} + +/* prettier-ignore */ +declare module 'vue' { + export interface GlobalComponents { + ContentCard: typeof import('./src/components/ContentCard.vue')['default'] + ContentField: typeof import('./src/views/ContentField.vue')['default'] + } +} diff --git a/vite.config.ts b/vite.config.ts index 143057f..39b7115 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,17 +1,18 @@ -import { fileURLToPath, URL } from 'node:url' - -import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' +import {fileURLToPath, URL} from 'node:url' +import Components from 'unplugin-vue-components/vite' + +import {defineConfig} from 'vite' import markdown from './vite/markdown' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue(), vueJsx(), markdown()], - resolve: { - alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) - } - }, - base: '/TDP-FT/' + plugins: [vue(), vueJsx(), markdown(), Components({ dts: true, dirs: ['src/components', 'src/views'] })], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + }, + base: '/TDP-FT/' })