refactor: webpack config (#11421)

This commit is contained in:
forehalo
2025-04-03 11:55:56 +00:00
parent 565d7b2b1e
commit c8d22d97d5
51 changed files with 766 additions and 547 deletions
@@ -1,3 +1,4 @@
import { getWorkerUrl } from '@affine/env/worker';
import { ListLayoutHandlerExtension } from '@blocksuite/affine/blocks/list';
import { ParagraphLayoutHandlerExtension } from '@blocksuite/affine/blocks/paragraph';
import {
@@ -6,15 +7,7 @@ import {
} from '@blocksuite/affine/gfx/turbo-renderer';
function createPainterWorker() {
const worker = new Worker(
/* webpackChunkName: "turbo-painter-entry" */ new URL(
'./turbo-painter-entry.worker.ts',
import.meta.url
),
{
type: 'module',
}
);
const worker = new Worker(getWorkerUrl('turbo-painter-entry.worker.js'));
return worker;
}