Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat(core): allow core modules to import itself (#5207)

Peng Xiao2b5343053948
diff --git a/packages/frontend/core/package.json b/packages/frontend/core/package.json
index a06d069ebb..a208f2b125 100644
--- a/packages/frontend/core/package.json
+++ b/packages/frontend/core/package.json
@@ -13,7 +13,7 @@
"./router": "./src/router.ts",
"./bootstrap/setup": "./src/bootstrap/setup.ts",
"./bootstrap/register-plugins": "./src/bootstrap/register-plugins.ts",
- "./components/pure/*": "./src/components/pure/*/index.tsx"
+ "./*": "./src/*"
},
"dependencies": {
"@affine-test/fixtures": "workspace:*",
diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx
index d34b79e522..ce005f65b9 100644
--- a/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx
+++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx
@@ -1,5 +1,6 @@
import { Avatar } from '@affine/component/ui/avatar';
import { Tooltip } from '@affine/component/ui/tooltip';
+import { useCurrentSyncEngine } from '@affine/core/hooks/current/use-current-sync-engine';
import { WorkspaceFlavour } from '@affine/env/workspace';
import {
type SyncEngineStatus,
@@ -24,7 +25,6 @@ import {
useState,
} from 'react';
-import { useCurrentSyncEngine } from '../../../../hooks/current/use-current-sync-engine';
import { useSystemOnline } from '../../../../hooks/use-system-online';
import type { AllWorkspace } from '../../../../shared';
import { Loading } from './loading-icon';