refactor(infra): directory structure (#4615)
This commit is contained in:
1 parent
814d552be8
commit
bed9310519
1150 files changed
+539
-584
No files matched your search
@@ -0,0 +1,47 @@
|
||||
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'),
|
||||
command: resolve(root, 'src/command/index.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',
|
||||
'nanoid',
|
||||
/^jotai/,
|
||||
/^@blocksuite/,
|
||||
/^@affine\/templates/,
|
||||
],
|
||||
},
|
||||
},
|
||||
plugins: [dts()],
|
||||
});
|
||||
Reference in new issue
Block a user