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 himself65
parent c2c2ccbf5d
commit b79a63ce0a
51 changed files with 489 additions and 209 deletions

View File

@@ -41,12 +41,20 @@ export const config = () => {
electronDir,
'./layers/main/src/workers/merge-update.worker.ts'
),
resolve(electronDir, './layers/main/src/workers/plugin.worker.ts'),
],
outdir: resolve(electronDir, './dist/layers/main'),
bundle: true,
target: `node${NODE_MAJOR_VERSION}`,
platform: 'node',
external: ['electron', 'yjs', 'electron-updater', '@toeverything/infra'],
external: [
'electron',
'yjs',
'better-sqlite3',
'electron-updater',
'@toeverything/plugin-infra',
'async-call-rpc',
],
define: define,
format: 'cjs',
loader: {