fix(core): hmr issue on dev (#5006)

I suspect HMR does not working properly on dev because we have multiple entries.
One relative issue: https://github.com/webpack/webpack-dev-server/issues/2792/

I think we do not need multiple entries for polyfills & plugins after all. They could be in the same chunk, and could be later optimized through splitChunks option.

`ses.ts` is changed to `ses-lockdown.ts` because `ses.ts` does not pass circular dependency check by madge. I haven't looked through the real root cause though. See https://github.com/pahen/madge/issues/355
This commit is contained in:
Peng Xiao
2023-11-21 17:27:16 +00:00
parent 615255706d
commit f33c49b27e
4 changed files with 13 additions and 28 deletions

View File

@@ -1,3 +1,6 @@
import '../polyfill/ses-lockdown';
import '../polyfill/intl-segmenter';
import { assertExists } from '@blocksuite/global/utils';
import {
getCurrentStore,

View File

@@ -1,3 +1,6 @@
import './polyfill/ses-lockdown';
import './polyfill/intl-segmenter';
import { WorkspaceFallback } from '@affine/component/workspace';
import { assertExists } from '@blocksuite/global/utils';
import { getCurrentStore } from '@toeverything/infra/atom';
@@ -36,4 +39,6 @@ async function main() {
);
}
await main();
main().catch(err => {
console.error('Failed to bootstrap app', err);
});