feat(tooling): use vite-config tooling pkg
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
"peerDependencies": {
|
||||
"@vue-flow/core": "^1.12.2"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@vue-flow/core": "workspace:*",
|
||||
"@vue-flow/eslint-config": "workspace:*",
|
||||
|
||||
@@ -29,19 +29,15 @@
|
||||
"test": "exit 0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue-flow/core": "^1.12.2",
|
||||
"vue": "^3.2.37"
|
||||
"@vue-flow/core": "^1.12.2"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@vue-flow/core": "workspace:*",
|
||||
"@vue-flow/eslint-config": "workspace:*",
|
||||
"@vue-flow/tsconfig": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"unplugin-auto-import": "^0.14.4",
|
||||
"vite": "^4.1.3",
|
||||
"vite-plugin-vue-type-imports": "^0.2.4",
|
||||
"vite-svg-loader": "^3.6.0",
|
||||
"@vue-flow/vite-config": "workspace:*",
|
||||
"vite": "^4.1.4",
|
||||
"vite-svg-loader": "^4.0.0",
|
||||
"vue-tsc": "^1.1.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
"./src",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,47 +1,15 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import vueTypes from 'vite-plugin-vue-type-imports'
|
||||
import { withConfig } from '@vue-flow/vite-config'
|
||||
import svgLoader from 'vite-svg-loader'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
extensions: ['.ts', '.vue'],
|
||||
},
|
||||
export default withConfig({
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
lib: {
|
||||
formats: ['es', 'cjs', 'iife'],
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
fileName: 'vue-flow-controls',
|
||||
name: 'vueFlowControls',
|
||||
},
|
||||
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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
reactivityTransform: true,
|
||||
}),
|
||||
vueTypes(),
|
||||
AutoImport({
|
||||
imports: ['vue', 'vue/macros'],
|
||||
dts: 'src/auto-imports.d.ts',
|
||||
}),
|
||||
svgLoader(),
|
||||
],
|
||||
plugins: [svgLoader() as any],
|
||||
})
|
||||
|
||||
@@ -49,16 +49,14 @@
|
||||
"@types/d3": "^7.4.0",
|
||||
"@vue-flow/eslint-config": "workspace:*",
|
||||
"@vue-flow/tsconfig": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue-flow/vite-config": "workspace:*",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"postcss-nested": "^6.0.1",
|
||||
"ts-patch": "^2.1.0",
|
||||
"typescript-transform-paths": "^3.4.6",
|
||||
"unplugin-auto-import": "^0.14.4",
|
||||
"unplugin-vue-macros": "^1.8.2",
|
||||
"vite": "^4.1.3",
|
||||
"vite": "^4.1.4",
|
||||
"vue-tsc": "^1.1.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
Vendored
+2
-9
@@ -1,7 +1,4 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-auto-import
|
||||
// Generated by 'unplugin-auto-import'
|
||||
export {}
|
||||
declare global {
|
||||
const $$: typeof import('vue/macros')['$$']
|
||||
@@ -168,6 +165,7 @@ declare global {
|
||||
const rendererPointToPoint: typeof import('./utils/graph')['rendererPointToPoint']
|
||||
const resetRecentHandle: typeof import('./utils/handle')['resetRecentHandle']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const resolveDirective: typeof import('vue')['resolveDirective']
|
||||
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
||||
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
@@ -378,8 +376,3 @@ declare global {
|
||||
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
|
||||
const whenever: typeof import('@vueuse/core')['whenever']
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue'
|
||||
}
|
||||
|
||||
@@ -24,5 +24,10 @@
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"],
|
||||
"files": ["package.json"]
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import AutoImport from 'unplugin-auto-import/vite'
|
||||
import replace from '@rollup/plugin-replace'
|
||||
import pkg from './package.json'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
"test": "exit 0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue-flow/core": "^1.12.2",
|
||||
"vue": "^3.2.37"
|
||||
"@vue-flow/core": "^1.12.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"d3-selection": "^3.0.0",
|
||||
@@ -42,10 +41,8 @@
|
||||
"@vue-flow/core": "workspace:*",
|
||||
"@vue-flow/eslint-config": "workspace:*",
|
||||
"@vue-flow/tsconfig": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"unplugin-auto-import": "^0.14.4",
|
||||
"vite": "^4.1.3",
|
||||
"vite-plugin-vue-type-imports": "^0.2.4",
|
||||
"@vue-flow/vite-config": "workspace:*",
|
||||
"vite": "^4.1.4",
|
||||
"vue-tsc": "^1.1.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,45 +1,13 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import vueTypes from 'vite-plugin-vue-type-imports'
|
||||
import { withConfig } from '@vue-flow/vite-config'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
extensions: ['.ts', '.vue'],
|
||||
},
|
||||
export default withConfig({
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
lib: {
|
||||
formats: ['es', 'cjs', 'iife'],
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
fileName: 'vue-flow-minimap',
|
||||
name: 'vueFlowMiniMap',
|
||||
},
|
||||
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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
reactivityTransform: true,
|
||||
}),
|
||||
vueTypes(),
|
||||
AutoImport({
|
||||
imports: ['vue', 'vue/macros'],
|
||||
dts: 'src/auto-imports.d.ts',
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
@@ -42,10 +42,9 @@
|
||||
"@vue-flow/core": "workspace:*",
|
||||
"@vue-flow/eslint-config": "workspace:*",
|
||||
"@vue-flow/tsconfig": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"unplugin-auto-import": "^0.14.4",
|
||||
"vite": "^4.1.3",
|
||||
"@vue-flow/vite-config": "workspace:*",
|
||||
"vite-plugin-vue-type-imports": "^0.2.4",
|
||||
"vite": "^4.1.4",
|
||||
"vue-tsc": "^1.1.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,45 +1,15 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import { withConfig } from '@vue-flow/vite-config'
|
||||
import vueTypes from 'vite-plugin-vue-type-imports'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
extensions: ['.ts', '.vue'],
|
||||
},
|
||||
export default withConfig({
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
lib: {
|
||||
formats: ['es', 'cjs', 'iife'],
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
fileName: 'vue-flow-node-resizer',
|
||||
name: 'vueFlowNodeResizer',
|
||||
},
|
||||
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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
reactivityTransform: true,
|
||||
}),
|
||||
vueTypes(),
|
||||
AutoImport({
|
||||
imports: ['vue', 'vue/macros'],
|
||||
dts: 'src/auto-imports.d.ts',
|
||||
}),
|
||||
],
|
||||
plugins: [vueTypes() as any],
|
||||
})
|
||||
|
||||
@@ -29,18 +29,14 @@
|
||||
"test": "exit 0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue-flow/core": "^1.12.2",
|
||||
"vue": "^3.2.37"
|
||||
"@vue-flow/core": "^1.12.2"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@vue-flow/core": "workspace:*",
|
||||
"@vue-flow/eslint-config": "workspace:*",
|
||||
"@vue-flow/tsconfig": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"unplugin-auto-import": "^0.14.4",
|
||||
"vite": "^4.1.3",
|
||||
"vite-plugin-vue-type-imports": "^0.2.4",
|
||||
"@vue-flow/vite-config": "workspace:*",
|
||||
"vite": "^4.1.4",
|
||||
"vue-tsc": "^1.1.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,45 +1,13 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import vueTypes from 'vite-plugin-vue-type-imports'
|
||||
import { withConfig } from '@vue-flow/vite-config'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
extensions: ['.ts', '.vue'],
|
||||
},
|
||||
export default withConfig({
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
lib: {
|
||||
formats: ['es', 'cjs', 'iife'],
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
fileName: 'vue-flow-node-toolbar',
|
||||
name: 'vueFlowNodeToolbar',
|
||||
},
|
||||
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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
reactivityTransform: true,
|
||||
}),
|
||||
vueTypes(),
|
||||
AutoImport({
|
||||
imports: ['vue', 'vue/macros'],
|
||||
dts: 'src/auto-imports.d.ts',
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
@@ -26,27 +26,25 @@
|
||||
"test": "exit 0;",
|
||||
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix ."
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue-flow/core": "^1.12.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"pathfinding": "^0.4.18",
|
||||
"perfect-arrows": "^0.3.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/pathfinding": "^0.0.6",
|
||||
"@vue-flow/core": "workspace:*",
|
||||
"@vue-flow/eslint-config": "workspace:*",
|
||||
"@vue-flow/tsconfig": "workspace:*",
|
||||
"@types/pathfinding": "^0.0.6",
|
||||
"@vue-flow/vite-config": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"ts-patch": "^2.1.0",
|
||||
"typescript-transform-paths": "^3.4.6",
|
||||
"unplugin-auto-import": "^0.14.4",
|
||||
"vite": "^4.1.3",
|
||||
"vite-plugin-vue-type-imports": "^0.2.4",
|
||||
"vite": "^4.1.4",
|
||||
"vue-tsc": "^1.1.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue-flow/core": "^1.12.2",
|
||||
"vue": "^3.2.25"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
const $$: typeof import('vue/macros')['$$']
|
||||
const $: typeof import('vue/macros')['$']
|
||||
const $computed: typeof import('vue/macros')['$computed']
|
||||
const $customRef: typeof import('vue/macros')['$customRef']
|
||||
const $ref: typeof import('vue/macros')['$ref']
|
||||
const $shallowRef: typeof import('vue/macros')['$shallowRef']
|
||||
const $toRef: typeof import('vue/macros')['$toRef']
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
|
||||
@@ -1,47 +1,13 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueTypes from 'vite-plugin-vue-type-imports'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import { withConfig } from '@vue-flow/vite-config'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'~': resolve('src'),
|
||||
},
|
||||
dedupe: ['vue'],
|
||||
extensions: ['.ts', '.vue'],
|
||||
},
|
||||
export default withConfig({
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
lib: {
|
||||
formats: ['es', 'cjs', 'iife'],
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
fileName: 'vue-flow-pathfinding-edge',
|
||||
name: 'vueFlowPathfindingEdge',
|
||||
},
|
||||
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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
vueTypes(),
|
||||
AutoImport({
|
||||
imports: ['vue'],
|
||||
dts: 'src/auto-imports.d.ts',
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
@@ -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