Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://module-federation.io/configure/getpublicpath.html #2431

Open
4 of 5 tasks
alyahmedaly opened this issue Apr 30, 2024 · 1 comment
Open
4 of 5 tasks

https://module-federation.io/configure/getpublicpath.html #2431

alyahmedaly opened this issue Apr 30, 2024 · 1 comment

Comments

@alyahmedaly
Copy link
Contributor

alyahmedaly commented Apr 30, 2024

Describe the bug

I think this is outdated document, I want a way to manage public path for async chunks in my webpack build I thought I can use getpublicpath for the doc but it's not available in ts types and even webpack generate error about it @ScriptedAlchemy any recommendations?

Reproduction

not required

Used Package Manager

npm

System Info

not required

Validations

@ScriptedAlchemy
Copy link
Member

ScriptedAlchemy commented May 1, 2024

Get public path is not released yet, but should be soon.

In the meantime you should be able to use webpack_require.p = customPath in a runtime plugin.

if(__FEDERATION__.__INSTANCES__[0].options.name !=== __webpack_require__.federation.initOptions.name) {
// this is a remote container, since host is always 0 and the names dont match
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants