fix: HRM in dev
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
import { defineConfig } from '@umijs/max';
|
||||
import keepAlive from './keep-alive';
|
||||
import { extraMfsuExclude } from './mfsu.extensions';
|
||||
import { compressionPluginConfig, monacoPluginConfig } from './plugins';
|
||||
import proxy from './proxy';
|
||||
import routes from './routes';
|
||||
@@ -32,7 +33,7 @@ export default defineConfig({
|
||||
defaultSizes: 'parsed' // stat // gzip
|
||||
},
|
||||
mfsu: {
|
||||
exclude: ['lodash', 'ml-pca']
|
||||
exclude: ['lodash', 'ml-pca', ...extraMfsuExclude]
|
||||
},
|
||||
base: process.env.npm_config_base || '/',
|
||||
...(isProduction
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Identity hook for build-time mfsu.exclude extensions. Tooling may
|
||||
// overwrite this file to add package names that must skip MFSU's
|
||||
// pre-bundling; the original is restored on cleanup. Mirrors
|
||||
// `src/request.extensions.ts` / `src/access.extensions.ts`.
|
||||
//
|
||||
// MFSU bundles node_modules into immutable chunks at dev startup, so
|
||||
// workspace-linked packages whose source you edit during dev must be
|
||||
// excluded here or HMR won't pick up changes.
|
||||
export const extraMfsuExclude: string[] = [];
|
||||
Reference in New Issue
Block a user