mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-27 22:36:06 +00:00
- Split forge_proxy.types.ts into contract.types.ts and io.types.ts - Add barrel exports for core/, providers/, utils/, typescript/ - Restrict untyped and core helpers to root proxy only - Add key, schema, endpoint to intermediate proxy types - Disable rollupTypes for barrel compatibility
49 lines
1005 B
TypeScript
49 lines
1005 B
TypeScript
import react from '@vitejs/plugin-react'
|
|
import { resolve } from 'path'
|
|
import { defineConfig } from 'vite'
|
|
import dts from 'vite-plugin-dts'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
dts({
|
|
rollupTypes: false,
|
|
entryRoot: resolve(__dirname, 'src'),
|
|
outDir: resolve(__dirname, 'dist')
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src')
|
|
}
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.ts'),
|
|
formats: ['es', 'cjs'],
|
|
fileName: format => `index.${format === 'es' ? 'mjs' : 'js'}`
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
'react',
|
|
'react-dom',
|
|
'react/jsx-runtime',
|
|
'@tanstack/react-query',
|
|
'zod',
|
|
'axios',
|
|
'crypto-js',
|
|
'json-schema-to-ts',
|
|
'socket.io-client'
|
|
],
|
|
output: {
|
|
globals: {
|
|
react: 'React',
|
|
'react-dom': 'ReactDOM'
|
|
}
|
|
}
|
|
},
|
|
sourcemap: false,
|
|
minify: true
|
|
}
|
|
})
|