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

Feature Request: Pass the defaultPublicPath as an argument to the 'methodName' function #113

Open
sachin-hg opened this issue Feb 17, 2023 · 0 comments

Comments

@sachin-hg
Copy link

PR for the same: #112

Sometimes it's required to modify the publicPath while taking the defaultPublicPath as a parameter

Usecase: Multiple webpack builds on same page: and defaultPublicPath for each is something like: //mydomain.com/static/<APP_NAME>/ now I need to change it to //myOtherDomain.com/static/<APP_NAME>/

therefore, if I use the plugin like so:

new WebpackRequireFrom({methodName: 'get_public_path'})

and have get_public_path defined like so:

window.get_public_path = defaultPublicPath => defaultPublicPath.replace('myDomain', 'myOtherDomain')

I would be able to achieve it for all apps

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

1 participant