Skip to content

Commit

Permalink
fix: ScriptManager import path in MF runtime plugins (CorePlugin & Re…
Browse files Browse the repository at this point in the history
…solverPlugin) (#835)

* fix: Module Resolution Errors for ScriptManager Imports

* chore: Lint

* chore: Changeset updated
  • Loading branch information
mrsasuu authored Dec 20, 2024
1 parent a349bca commit ae89e38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/lazy-comics-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@callstack/repack": patch
---

Fix ScriptManager import path in MF runtime plugins (CorePlugin & ResolverPlugin)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type * as RepackClient from '../ScriptManager/index.js';
const RepackCorePlugin: () => FederationRuntimePlugin = () => ({
name: 'repack-core-plugin',
loadEntry: async ({ remoteInfo }) => {
const client = require('../ScriptManager.js') as typeof RepackClient;
const client = require('../ScriptManager/index.js') as typeof RepackClient;
const { ScriptManager, getWebpackContext } = client;
const { entry, entryGlobalName } = remoteInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const RepackResolverPlugin: (
name: 'repack-resolver-plugin',
afterResolve(args) {
const { ScriptManager } =
require('../ScriptManager.js') as typeof RepackClient;
require('../ScriptManager/index.js') as typeof RepackClient;
const { remoteInfo } = args;

ScriptManager.shared.addResolver(
Expand Down

0 comments on commit ae89e38

Please sign in to comment.