feat(core): new worker workspace engine (#9257)

This commit is contained in:
EYHN
2025-01-17 00:22:18 +08:00
committed by GitHub
parent 7dc470e7ea
commit a2ffdb4047
219 changed files with 4267 additions and 7194 deletions
+13
View File
@@ -99,6 +99,19 @@ export function createShellHTMLPlugin(
});
}
export function createBackgroundWorkerHTMLPlugin(
flags: BuildFlags,
BUILD_CONFIG: BUILD_CONFIG_TYPE
) {
const htmlPluginOptions = getHTMLPluginOptions(flags, BUILD_CONFIG);
return new HTMLPlugin({
...htmlPluginOptions,
chunks: ['backgroundWorker'],
filename: `background-worker.html`,
});
}
export function createHTMLPlugins(
flags: BuildFlags,
BUILD_CONFIG: BUILD_CONFIG_TYPE
+6 -1
View File
@@ -14,7 +14,11 @@ import webpack from 'webpack';
import type { Configuration as DevServerConfiguration } from 'webpack-dev-server';
import { productionCacheGroups } from './cache-group.js';
import { createHTMLPlugins, createShellHTMLPlugin } from './html-plugin.js';
import {
createBackgroundWorkerHTMLPlugin,
createHTMLPlugins,
createShellHTMLPlugin,
} from './html-plugin.js';
import { WebpackS3Plugin } from './s3-plugin.js';
import type { BuildFlags } from './types';
@@ -426,6 +430,7 @@ export function createWebpackConfig(
if (buildConfig.isElectron) {
config.plugins.push(createShellHTMLPlugin(flags, buildConfig));
config.plugins.push(createBackgroundWorkerHTMLPlugin(flags, buildConfig));
}
return config;
+4
View File
@@ -527,6 +527,7 @@ export const PackageList = [
'packages/frontend/core',
'packages/frontend/electron-api',
'packages/frontend/i18n',
'packages/common/nbstore',
'packages/common/infra',
'tools/utils',
],
@@ -552,6 +553,7 @@ export const PackageList = [
'packages/frontend/component',
'packages/frontend/core',
'packages/frontend/i18n',
'packages/common/nbstore',
'blocksuite/affine/all',
'packages/common/infra',
],
@@ -563,6 +565,7 @@ export const PackageList = [
'packages/frontend/component',
'packages/frontend/core',
'packages/frontend/i18n',
'packages/common/nbstore',
'packages/common/infra',
],
},
@@ -587,6 +590,7 @@ export const PackageList = [
'packages/common/env',
'packages/frontend/graphql',
'packages/frontend/i18n',
'packages/common/nbstore',
'packages/frontend/templates',
'packages/frontend/track',
'blocksuite/affine/all',