aieditor/vite.config.ts

23 lines
595 B
TypeScript
Raw Normal View History

2023-11-12 12:18:57 +08:00
import {defineConfig} from 'vite'
import {resolve} from 'path';
import dts from 'vite-plugin-dts'
export default defineConfig({
2023-11-13 20:26:44 +08:00
define: {'process.env': {}},
2023-11-12 12:18:57 +08:00
build: {
2023-11-15 10:42:31 +08:00
minify: "esbuild",
2023-11-12 12:18:57 +08:00
lib: {
entry: resolve(__dirname, './src/index.ts'),
name: 'aieditor',
2023-11-12 14:09:46 +08:00
// fileName: (format) => `index.${format}.js`,
2023-11-12 12:18:57 +08:00
fileName: `index`,
2023-11-12 14:09:46 +08:00
formats: ['es', 'cjs']
2023-11-12 12:18:57 +08:00
},
},
2023-11-15 10:42:31 +08:00
plugins: [dts({rollupTypes: true}),
// legacy({
// targets: ['defaults', 'not IE 11','chrome 52'],
// }),
],
2023-11-12 12:18:57 +08:00
})