mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-29 00:32:51 +03:00
2f6c4e3696
Co-authored-by: Hongtao Lye <codert.sn@gmail.com> Co-authored-by: liuyi <forehalo@gmail.com> Co-authored-by: LongYinan <lynweklm@gmail.com> Co-authored-by: X1a0t <405028157@qq.com> Co-authored-by: JimmFly <yangjinfei001@gmail.com> Co-authored-by: Peng Xiao <pengxiao@outlook.com> Co-authored-by: xiaodong zuo <53252747+zuoxiaodong0815@users.noreply.github.com> Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> Co-authored-by: Qi <474021214@qq.com> Co-authored-by: danielchim <kahungchim@gmail.com>
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { resolve } from 'node:path';
|
|
|
|
import { fileURLToPath } from 'url';
|
|
import { defineConfig } from 'vite';
|
|
import dts from 'vite-plugin-dts';
|
|
|
|
const root = fileURLToPath(new URL('.', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
minify: false,
|
|
lib: {
|
|
entry: {
|
|
blocksuite: resolve(root, 'src/blocksuite/index.ts'),
|
|
index: resolve(root, 'src/index.ts'),
|
|
atom: resolve(root, 'src/atom.ts'),
|
|
type: resolve(root, 'src/type.ts'),
|
|
'core/event-emitter': resolve(root, 'src/core/event-emitter.ts'),
|
|
'preload/electron': resolve(root, 'src/preload/electron.ts'),
|
|
'__internal__/workspace': resolve(
|
|
root,
|
|
'src/__internal__/workspace.ts'
|
|
),
|
|
'__internal__/react': resolve(root, 'src/__internal__/react.ts'),
|
|
'__internal__/plugin': resolve(root, 'src/__internal__/plugin.ts'),
|
|
},
|
|
formats: ['es', 'cjs'],
|
|
name: 'AffineInfra',
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
'electron',
|
|
'async-call-rpc',
|
|
'rxjs',
|
|
'zod',
|
|
'react',
|
|
'yjs',
|
|
/^jotai/,
|
|
/^@blocksuite/,
|
|
/^@affine\/templates/,
|
|
],
|
|
},
|
|
},
|
|
plugins: [dts()],
|
|
});
|