From 707facbc961a6e08abde38350f0a548777764e58 Mon Sep 17 00:00:00 2001 From: Alexandr Date: Tue, 26 Jul 2022 17:05:18 +0300 Subject: [PATCH] fix: injection warnings --- docs/vite.config.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/vite.config.ts diff --git a/docs/vite.config.ts b/docs/vite.config.ts new file mode 100644 index 0000000..36334c4 --- /dev/null +++ b/docs/vite.config.ts @@ -0,0 +1,31 @@ +import vue from '@vitejs/plugin-vue' +import { defineConfig } from 'vite' +import { resolve } from 'path' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue()], + resolve: { + alias: { + '@': resolve(__dirname, './src'), + }, + }, + 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', + }, + }, + }, + }, +})