Files
ordo-designer-vue/apps/playground/vite.config.ts
T
0264408andCursor 18239a59ca feat: split Ordo designer into library monorepo
Extract ordo-designer-vue package with shadcn UI and context-based state; add playground app, library-api docs, and README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 15:22:59 +08:00

30 lines
1023 B
TypeScript

import path from 'node:path'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
import tailwindcss from '@tailwindcss/vite'
const pkgDist = fileURLToPath(new URL('../../packages/ordo-designer-vue/dist/ordo-designer-vue.js', import.meta.url))
const pkgStyle = fileURLToPath(new URL('../../packages/ordo-designer-vue/dist/style.css', import.meta.url))
export default defineConfig({
plugins: [vue(), vueDevTools(), tailwindcss()],
resolve: {
alias: [
{ find: '@', replacement: fileURLToPath(new URL('./src', import.meta.url)) },
{ find: 'ordo-designer-vue/style.css', replacement: pkgStyle },
// Exact entry only — avoid breaking `ordo-designer-vue/style.css` subpath.
{ find: /^ordo-designer-vue$/, replacement: pkgDist },
],
},
server: {
proxy: {
'/ordo': {
target: 'http://localhost:8080',
changeOrigin: true,
},
},
},
})