build: improve webpack config (#3561)

This commit is contained in:
Alex Yang
2023-08-03 16:05:46 -07:00
committed by GitHub
parent f2ac4c7eda
commit 0c16eb1189
21 changed files with 365 additions and 234 deletions

View File

@@ -1,5 +1,4 @@
import type { PluginContext } from '@affine/sdk/entry';
import { currentWorkspaceAtom, rootStore } from '@affine/sdk/entry';
import { createElement } from 'react';
import { lazy } from 'react';
import { createRoot } from 'react-dom/client';
@@ -11,7 +10,6 @@ const HeaderItem = lazy(() =>
export const entry = (context: PluginContext) => {
console.log('register');
console.log('hello, world!');
console.log(rootStore.get(currentWorkspaceAtom));
context.register('headerItem', div => {
const root = createRoot(div);
root.render(createElement(HeaderItem));