mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
feat: plugin system with isolated bundles (#2660)
(cherry picked from commit 94d20f1bdc)
This commit is contained in:
33
plugins/bookmark-block/vite.config.ts
Normal file
33
plugins/bookmark-block/vite.config.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
const rootDir = fileURLToPath(new URL('.', import.meta.url));
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
minify: false,
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/server.ts'),
|
||||
fileName: 'server',
|
||||
formats: ['cjs'],
|
||||
},
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
external: ['cheerio', 'electron', 'node:url'],
|
||||
output: {
|
||||
dir: resolve(
|
||||
rootDir,
|
||||
'..',
|
||||
'..',
|
||||
'apps',
|
||||
'electron',
|
||||
'dist',
|
||||
'plugins',
|
||||
'bookmark-block'
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user