feat: add possibility to use @ alias inside docs
This commit is contained in:
@@ -1,31 +1,11 @@
|
|||||||
import vue from '@vitejs/plugin-vue'
|
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve(__dirname, './src'),
|
'@': resolve(__dirname, '../src'), // to resolve @ inside docs
|
||||||
},
|
|
||||||
},
|
|
||||||
build: {
|
|
||||||
lib: {
|
|
||||||
entry: resolve(__dirname, './src/index.ts'),
|
|
||||||
name: 'flowbite-vue',
|
|
||||||
},
|
|
||||||
rollupOptions: {
|
|
||||||
// make sure to externalize deps that shouldn't be bundled
|
|
||||||
// into your library
|
|
||||||
external: ['vue'],
|
|
||||||
output: {
|
|
||||||
// Provide global variables to use in the UMD build
|
|
||||||
// for externalized deps
|
|
||||||
globals: {
|
|
||||||
vue: 'Vue',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import type { PropType } from 'vue'
|
|||||||
import Spinner from '../Spinner/Spinner.vue'
|
import Spinner from '../Spinner/Spinner.vue'
|
||||||
import { useButtonClasses } from './composables/useButtonClasses'
|
import { useButtonClasses } from './composables/useButtonClasses'
|
||||||
import { useButtonSpinner } from './composables/useButtonSpinner'
|
import { useButtonSpinner } from './composables/useButtonSpinner'
|
||||||
import FlowbiteThemableChild from '../utils/FlowbiteThemable/components/FlowbiteThemableChild/FlowbiteThemableChild.vue'
|
import FlowbiteThemableChild from '@/components/utils/FlowbiteThemable/components/FlowbiteThemableChild/FlowbiteThemableChild.vue'
|
||||||
|
|
||||||
import type { ButtonGradient, ButtonMonochromeGradient, ButtonSize, ButtonVariant } from './types'
|
import type { ButtonGradient, ButtonMonochromeGradient, ButtonSize, ButtonVariant } from './types'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import {
|
|||||||
import { useTabsClasses } from './composables/useTabsClasses'
|
import { useTabsClasses } from './composables/useTabsClasses'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { computed, provide, toRef, useSlots } from 'vue'
|
import { computed, provide, toRef, useSlots } from 'vue'
|
||||||
import { flatten } from '../../utils/flatten'
|
import { flatten } from '@/utils/flatten'
|
||||||
import TabPane from './components/TabPane/TabPane.vue'
|
import TabPane from './components/TabPane/TabPane.vue'
|
||||||
import type { TabsVariant } from './types'
|
import type { TabsVariant } from './types'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user