Skip to content

[Bug]: When the base attribute is set from the vite define Config, is not reflecting in mf-manifest.json #357

@siddiq-rehman

Description

@siddiq-rehman

Describe the bug

Hello,

When are dynamically registering a MFE with "registerRemotes" in the host using the mf-manifest file, let us say,

registerRemotes([
{
name: 'testMFE', // This is hello world mfe
entry: 'http://localhost:6001/mf-manifest.json',
type: 'manifest',
}
])

Now when it tries to load the remoteEntry from testMFE, it is pointing to the host server path. I instead of setting publicPath, I did set vite base path, But it is not reflecting in the mf-manifest.json.

So, when I set the publicPath in the mfe to "http://localhost:6001", It is all fine, But now I cannot run the MFE in dev mode due to

 dcpNextGenMfe__H_A_I…oInit__H_A_I__.js:3 
 Uncaught TypeError: Failed to resolve module specifier 'http://localhost:6001http://localhost:6001/remoteEntry-[hash]'
    at testMfe__H_A_I…it__H_A_I__.js:3:51

Version

7.2.2

Reproduction

NA

Relevant log output

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions