feat: add toolbar pkg

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-09 20:52:01 +01:00
committed by Braks
parent 4103ef60bb
commit 2829f8a92d
6 changed files with 117 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { resolve } from 'path'
import { defineConfig } from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
extensions: ['.ts', '.vue'],
},
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'cjs', 'iife'],
entry: resolve(__dirname, 'src/index.ts'),
fileName: 'vue-flow-toolbar',
name: 'vueFlowToolbar',
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue', '@vue-flow/core'],
output: {
dir: './dist',
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
'vue': 'Vue',
'@vue-flow/core': 'VueFlow',
},
},
},
},
})