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 Alex Yang
parent a0ee00a4b2
commit af205cde7c
51 changed files with 489 additions and 209 deletions
+3 -3
View File
@@ -3,12 +3,12 @@ import '@affine/component/theme/theme.css';
// bootstrap code before everything
import '../bootstrap';
import { AffineContext } from '@affine/component/context';
import { WorkspaceFallback } from '@affine/component/workspace';
import { config } from '@affine/env';
import { createI18n, I18nextProvider } from '@affine/i18n';
import type { EmotionCache } from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import { AffinePluginContext } from '@toeverything/plugin-infra/react';
import type { AppProps } from 'next/app';
import Head from 'next/head';
import { useRouter } from 'next/router';
@@ -64,7 +64,7 @@ const App = function App({
<MessageCenter />
<AffineErrorBoundary router={useRouter()}>
<Suspense fallback={<WorkspaceFallback key="RootPageLoading" />}>
<AffinePluginContext>
<AffineContext>
<Head>
<title>AFFiNE</title>
<meta
@@ -75,7 +75,7 @@ const App = function App({
<DebugProvider>
{getLayout(<Component {...pageProps} />)}
</DebugProvider>
</AffinePluginContext>
</AffineContext>
</Suspense>
</AffineErrorBoundary>
</I18nextProvider>