diff --git a/libs/mf/src/utils/modify-entry-plugin.ts b/libs/mf/src/utils/modify-entry-plugin.ts index 08606a67..43c217b5 100644 --- a/libs/mf/src/utils/modify-entry-plugin.ts +++ b/libs/mf/src/utils/modify-entry-plugin.ts @@ -14,18 +14,20 @@ export class ModifyEntryPlugin { return values.length > 0 ? objFn(values) : {}; }; Object.keys(this.config).forEach((key) => { - compiler.options.entry[key] = { - ...cfgOrRemove( - (v) => ({ import: v }), - (c) => c.import, - key - ), - ...cfgOrRemove( - (v) => ({ dependOn: v }), - (c) => c.dependOn, - key - ), - }; + if (compiler.options.entry[key]) { + compiler.options.entry[key] = { + ...cfgOrRemove( + (v) => ({ import: v }), + (c) => c.import, + key + ), + ...cfgOrRemove( + (v) => ({ dependOn: v }), + (c) => c.dependOn, + key + ) + }; + } }); } }