feat(tooling): use vite-config tooling pkg

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-22 20:20:11 +01:00
committed by Braks
parent 7b590bd526
commit 2aa185756b
27 changed files with 662 additions and 1082 deletions
+2 -1
View File
@@ -38,6 +38,7 @@
"@vue-flow/core": "workspace:*",
"@vue-flow/eslint-config": "workspace:*",
"@vue-flow/tsconfig": "workspace:*",
"@vue-flow/vite-config": "workspace:*",
"@vue-flow/minimap": "workspace:*"
},
"devDependencies": {
@@ -45,7 +46,7 @@
"postcss": "^8.4.21",
"postcss-cli": "^10.1.0",
"postcss-nested": "^6.0.1",
"vite": "^4.1.3"
"vite": "^4.1.4"
},
"publishConfig": {
"access": "public",
+2 -24
View File
@@ -1,35 +1,13 @@
import { resolve } from 'path'
import { defineConfig } from 'vite'
import { withConfig } from '@vue-flow/vite-config'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'~': resolve('src'),
},
extensions: ['.ts'],
},
export default withConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'cjs', 'iife'],
entry: resolve(__dirname, 'src/index.ts'),
fileName: 'vue-flow',
name: 'vueFlow',
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue'],
output: {
format: 'esm',
dir: './dist',
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
},
},
},
},
})