mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
refactor: use esbuild instead of vite (#2672)
(cherry picked from commit acda594cba)
This commit is contained in:
@@ -7,10 +7,6 @@
|
||||
".": "./src/index.ts",
|
||||
"./server": "./src/server.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"dev": "vite build --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@toeverything/plugin-infra": "workspace:*",
|
||||
"cheerio": "^1.0.0-rc.12"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["vite.config.ts", "scripts"]
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
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