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] Not need to set the publicPath in development when using manifest #2449

Closed
2 tasks done
fz6m opened this issue May 4, 2024 · 4 comments
Closed
2 tasks done
Labels
✨ enhancement New feature or request

Comments

@fz6m
Copy link
Contributor

fz6m commented May 4, 2024

Clear and concise description of the problem

Currently, setting the publicPath is forced in development, IMO it is redundant and unnecessary.

If we know a URL, we can infer its publicPath.

For example:

  remotes: {
    mf_remote: 'mf_remote@http://localhost:9527/mf-manifest.json',
    // inferred as `http://localhost:9527/`
  }

If the consumer side finds that the publicPath does not start with https?:// or // , it should first try to fetch the possible URL ( use http://localhost:9527/ as publicPath ) and check response, if no response, then fallback try to fetch http://${current_project_host}:${current_project_port}/ (the end with / is publicPath ) .

Suggested solution

No Response

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@ScriptedAlchemy
Copy link
Member

Yeah this is something I already have planned and spoke to @2heal1 about. Will try to send a PR this week

@zhoushaw zhoushaw added the ✨ enhancement New feature or request label May 6, 2024
@zhoushaw
Copy link
Collaborator

zhoushaw commented May 6, 2024

Thank you for your advice, I think this might be a good idea, and we'll try to see how this works

@ScriptedAlchemy
Copy link
Member

PR has merged, should release soon

@ScriptedAlchemy
Copy link
Member

@fz6m this should be released now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants