fix: optimize DB pull (#2589)

This commit is contained in:
Peng Xiao
2023-05-31 11:09:18 +08:00
committed by GitHub
parent 2713340532
commit 617350fc7d
17 changed files with 619 additions and 40 deletions

View File

@@ -23,6 +23,7 @@ export const config = () => {
JSON.stringify(process.env[key] ?? ''),
]),
['process.env.NODE_ENV', `"${mode}"`],
['process.env.USE_WORKER', '"true"'],
]);
if (DEV_SERVER_URL) {
@@ -31,7 +32,10 @@ export const config = () => {
return {
main: {
entryPoints: [resolve(root, './layers/main/src/index.ts')],
entryPoints: [
resolve(root, './layers/main/src/index.ts'),
resolve(root, './layers/main/src/workers/merge-update.worker.ts'),
],
outdir: resolve(root, './dist/layers/main'),
bundle: true,
target: `node${NODE_MAJOR_VERSION}`,