mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
34 lines
687 B
TypeScript
34 lines
687 B
TypeScript
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'
|
|
),
|
|
},
|
|
},
|
|
},
|
|
});
|