feat: isolated plugin system (#2742)

(cherry picked from commit f2ac2e5b84)
This commit is contained in:
Himself65
2023-06-09 16:43:46 +08:00
committed by Alex Yang
parent a0ee00a4b2
commit af205cde7c
51 changed files with 489 additions and 209 deletions
+35
View File
@@ -0,0 +1,35 @@
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: {
type: resolve(root, 'src/type.ts'),
manager: resolve(root, 'src/manager.ts'),
},
},
rollupOptions: {
external: [
'jotai',
'jotai/vanilla',
'@blocksuite/blocks',
'@blocksuite/store',
'@blocksuite/global',
'@blocksuite/editor',
'@blocksuite/lit',
],
},
},
plugins: [
dts({
insertTypesEntry: true,
}),
],
});