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: devtool:
buildFlags.mode === 'production' buildFlags.mode === 'production'
? buildFlags.distribution === 'desktop' ? buildFlags.distribution === 'desktop'
? 'inline-cheap-source-map' ? 'nosources-source-map'
: 'source-map' : 'source-map'
: 'eval-cheap-module-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 { DisposableGroup } from '@blocksuite/global/utils';
import * as BlockSuiteGlobalUtils from '@blocksuite/global/utils'; import * as BlockSuiteGlobalUtils from '@blocksuite/global/utils';
import * as Icons from '@blocksuite/icons'; import * as Icons from '@blocksuite/icons';
import * as Manager from '@toeverything/plugin-infra/atom'; import * as Atom from '@toeverything/plugin-infra/atom';
import { import {
editorItemsAtom, editorItemsAtom,
headerItemsAtom, headerItemsAtom,
@ -48,8 +48,8 @@ const PluginProvider = ({ children }: PropsWithChildren) =>
); );
const customRequire = (id: string) => { const customRequire = (id: string) => {
if (id === '@toeverything/plugin-infra/manager') { if (id === '@toeverything/plugin-infra/atom') {
return Manager; return Atom;
} }
if (id === 'react') { if (id === 'react') {
return React; return React;

View File

@ -41,6 +41,7 @@ cd(repoRootDir);
// step 1: build web (nextjs) dist // step 1: build web (nextjs) dist
if (!process.env.SKIP_WEB_BUILD) { if (!process.env.SKIP_WEB_BUILD) {
await $`yarn -T run build:plugins`;
await $`DISTRIBUTION=desktop yarn nx build @affine/core`; await $`DISTRIBUTION=desktop yarn nx build @affine/core`;
await fs.move(affineCoreOutDir, publicAffineOutDir, { overwrite: true }); 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 type { BuildFlags } from '../config/index.js';
import { projectRoot } from '../config/index.js'; import { projectRoot } from '../config/index.js';
import { buildI18N } from '../util/i18n.js'; import { buildI18N } from '../util/i18n.js';
import { buildInfra } from '../util/infra.js';
const cwd = path.resolve(projectRoot, 'apps', 'core'); const cwd = path.resolve(projectRoot, 'apps', 'core');
@ -46,7 +45,6 @@ const flags = {
} satisfies BuildFlags; } satisfies BuildFlags;
buildI18N(); buildI18N();
await buildInfra();
spawn( spawn(
'node', 'node',
[ [

View File

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