refactor(infra): remove old plugin system (#5411)

plugin system need redesign
This commit is contained in:
EYHN
2023-12-27 02:49:59 +00:00
parent 3903a1c1d6
commit 265ee81666
110 changed files with 46 additions and 4426 deletions

View File

@@ -13,8 +13,6 @@ const editorFlags: BlockSuiteFeatureFlags = {
export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
const buildPreset: Record<BuildFlags['channel'], RuntimeConfig> = {
stable: {
enablePlugin: true,
builtinPlugins: ['/plugins/image-preview'],
enableTestProperties: false,
enableBroadcastChannelProvider: true,
enableDebugPage: true,
@@ -57,13 +55,6 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
},
// canary will be aggressive and enable all features
canary: {
enablePlugin: true,
builtinPlugins: [
'/plugins/copilot',
'/plugins/hello-world',
'/plugins/image-preview',
'/plugins/vue-hello-world',
],
enableTestProperties: true,
enableBroadcastChannelProvider: true,
enableDebugPage: true,
@@ -99,15 +90,6 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
const currentBuildPreset = buildPreset[currentBuild];
const environmentPreset = {
builtinPlugins: [
'/plugins/copilot',
'/plugins/hello-world',
'/plugins/image-preview',
'/plugins/vue-hello-world',
],
enablePlugin: process.env.ENABLE_PLUGIN
? process.env.ENABLE_PLUGIN === 'true'
: currentBuildPreset.enablePlugin,
enableTestProperties: process.env.ENABLE_TEST_PROPERTIES
? process.env.ENABLE_TEST_PROPERTIES === 'true'
: currentBuildPreset.enableTestProperties,