fix: plugin not found (#3415)

This commit is contained in:
Alex Yang 2023-07-27 05:56:59 -07:00 committed by GitHub
parent 39054a7c3d
commit 2980c1afac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 8 deletions

View File

@ -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',

View File

@ -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;

View File

@ -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 });
}

View File

@ -4,7 +4,6 @@ import path from 'node:path';
import type { BuildFlags } from '../config/index.js';
import { projectRoot } from '../config/index.js';
import { buildI18N } from '../util/i18n.js';
import { buildInfra } from '../util/infra.js';
const cwd = path.resolve(projectRoot, 'apps', 'core');
@ -46,7 +45,6 @@ const flags = {
} satisfies BuildFlags;
buildI18N();
await buildInfra();
spawn(
'node',
[

View File

@ -7,7 +7,6 @@ import { config } from 'dotenv';
import { type BuildFlags, projectRoot } from '../config/index.js';
import { watchI18N } from '../util/i18n.js';
import { watchInfra } from '../util/infra.js';
const files = ['.env', '.env.local'];
@ -94,7 +93,6 @@ flags.channel = buildFlags.channel as any;
flags.coverage = buildFlags.coverage;
watchI18N();
await watchInfra();
spawn(
'node',
[