mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
32 lines
729 B
TypeScript
32 lines
729 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { resolve } from 'node:path';
|
|
import dts from 'vite-plugin-dts';
|
|
import react from '@vitejs/plugin-react';
|
|
import { devDependencies, peerDependencies } from './package.json';
|
|
|
|
const externals = [...Object.keys(peerDependencies), ...Object.keys(devDependencies)];
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: resolve(import.meta.dirname, 'src/index.ts'),
|
|
name: 'LowCodeUtils',
|
|
formats: ['es'],
|
|
fileName: 'lowCodeUtils',
|
|
},
|
|
rollupOptions: {
|
|
external: externals,
|
|
},
|
|
},
|
|
plugins: [
|
|
react(),
|
|
dts({
|
|
rollupTypes: true,
|
|
compilerOptions: {
|
|
stripInternal: true,
|
|
paths: {},
|
|
},
|
|
}),
|
|
],
|
|
});
|