mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-24 02:13:26 +03:00
fix: plugin not found (#3415)
This commit is contained in:
parent
39054a7c3d
commit
2980c1afac
@ -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 });
|
||||
}
|
||||
|
@ -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',
|
||||
[
|
||||
|
@ -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',
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user