refactor: remove NoSsr on top level (#1951)
This commit is contained in:
1 parent
43a96fe8e3
commit
2383165470
27 files changed
+211
-133
No files matched your search
@@ -7,9 +7,17 @@
|
||||
"jotai": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20230413190748-4d32b79a-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230413190748-4d32b79a-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230413190748-4d32b79a-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230413190748-4d32b79a-nightly",
|
||||
"lottie-web": "^5.11.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@blocksuite/blocks": "*",
|
||||
"@blocksuite/editor": "*",
|
||||
"@blocksuite/global": "*",
|
||||
"@blocksuite/store": "*",
|
||||
"lottie-web": "*"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
import { getEnvironment } from '@affine/env';
|
||||
import type { EditorContainer } from '@blocksuite/editor';
|
||||
import { atom } from 'jotai';
|
||||
|
||||
export const lottieAtom = atom(async () =>
|
||||
import('lottie-web').then(m => m.default)
|
||||
export const lottieAtom = atom(import('lottie-web').then(m => m.default));
|
||||
|
||||
export const editorContainerModuleAtom = atom<Promise<typeof EditorContainer>>(
|
||||
getEnvironment().isServer
|
||||
? async () =>
|
||||
import('@blocksuite/editor').then(module => module.EditorContainer)
|
||||
: (import('@blocksuite/editor').then(
|
||||
module => module.EditorContainer
|
||||
) as any)
|
||||
);
|
||||
Reference in new issue
Block a user