mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 21:25:45 +08:00
fix: plugin not found (#3415)
This commit is contained in:
@@ -106,7 +106,7 @@ export const createConfiguration: (
|
||||
devtool:
|
||||
buildFlags.mode === 'production'
|
||||
? buildFlags.distribution === 'desktop'
|
||||
? 'inline-cheap-source-map'
|
||||
? 'nosources-source-map'
|
||||
: 'source-map'
|
||||
: 'eval-cheap-module-source-map',
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import * as BlockSuiteBlocksStd from '@blocksuite/blocks/std';
|
||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
||||
import * as BlockSuiteGlobalUtils from '@blocksuite/global/utils';
|
||||
import * as Icons from '@blocksuite/icons';
|
||||
import * as Manager from '@toeverything/plugin-infra/atom';
|
||||
import * as Atom from '@toeverything/plugin-infra/atom';
|
||||
import {
|
||||
editorItemsAtom,
|
||||
headerItemsAtom,
|
||||
@@ -48,8 +48,8 @@ const PluginProvider = ({ children }: PropsWithChildren) =>
|
||||
);
|
||||
|
||||
const customRequire = (id: string) => {
|
||||
if (id === '@toeverything/plugin-infra/manager') {
|
||||
return Manager;
|
||||
if (id === '@toeverything/plugin-infra/atom') {
|
||||
return Atom;
|
||||
}
|
||||
if (id === 'react') {
|
||||
return React;
|
||||
|
||||
@@ -41,6 +41,7 @@ cd(repoRootDir);
|
||||
|
||||
// step 1: build web (nextjs) dist
|
||||
if (!process.env.SKIP_WEB_BUILD) {
|
||||
await $`yarn -T run build:plugins`;
|
||||
await $`DISTRIBUTION=desktop yarn nx build @affine/core`;
|
||||
await fs.move(affineCoreOutDir, publicAffineOutDir, { overwrite: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user