feat(tooling): use vite-config tooling pkg
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user