mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
24 lines
693 B
TypeScript
24 lines
693 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { resolve } from 'node:path';
|
|
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: {
|
|
// Could also be a dictionary or array of multiple entry points
|
|
entry: resolve(import.meta.dirname, 'src/index.ts'),
|
|
name: 'LowCodeEditorSkeleton',
|
|
formats: ['es', 'cjs'],
|
|
// the proper extensions will be added
|
|
fileName: 'editorSkeleton',
|
|
},
|
|
rollupOptions: {
|
|
external: externals,
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
});
|