Skip to content

Allow entrypoints.json to be hosted remotely #97

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

Conversation

rlvdx
Copy link

@rlvdx rlvdx commented Oct 8, 2020

Fixes #76

  • When the assets Webpack Encore builds are not hosted on a Docker container's filesystem but published remotely (on a Google Cloud Storage bucket for example), file_exists on entrypoints.json fails.
  • When strict_mode is true, an exception is raised and it's imposible to load the assets.
  • Just after this check and condition, a file_get_contents is used to retrieve the entrypoints.json contents.

What I'm proposing is to use file_get_contents earlier to allow fetching a remote entrypoints.json to solve the CDN use case. Does it seem OK?

On a side note, I don't see how to run the tests locally, so the feedback loop with TRavis makes it difficult to fix them. How should I do? Thanks :)

@rlvdx rlvdx force-pushed the allow-entrypoints-file-to-be-hosted-remotely branch from 8acb968 to 52670b6 Compare October 8, 2020 08:13
@weaverryan weaverryan changed the base branch from master to main November 16, 2020 19:53
@piotrantosik
Copy link

hi, any news? it's any plan to implement this feature?

@rlvdx
Copy link
Author

rlvdx commented May 3, 2021

hi, any news? it's any plan to implement this feature?

Doesn't look like it, and I don't know how to make things go forward :)

@roublarstar
Copy link

Hello, I am in the same situation as you ... your solution seems viable to me too!

@jrushlow jrushlow added the Feature New Feature label Jul 6, 2022
Copy link

@Ahummeling Ahummeling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems exactly like what's needed.
I'm not a maintainer of this library, but it would be nice if we could have this.

@Kocal Kocal changed the base branch from main to 2.x October 1, 2024 07:40
@Kocal
Copy link
Member

Kocal commented Oct 1, 2024

I'm on it :)

@Kocal
Copy link
Member

Kocal commented Oct 1, 2024

Sorry but I wasn't able to push on your PR, instead I've opened a new PR #236

Kocal added a commit that referenced this pull request Oct 1, 2024
…uvradoux, Kocal)

This PR was merged into the 2.x branch.

Discussion
----------

Allow entrypoints.json to be hosted remotely

Fixes #76

See #97, this PR uses the Symfony HttpClient to remotely fetch the entrypoints file, but also to allow mocking in a proper way.
It also add/adapt many tests, and improve the documentation.

Commits
-------

f5b9a1d Use HttpClient instead of file_get_contents(), add tests and documentation
2fe9a88 Allow entrypoints.json to be hosted remotely
@Kocal Kocal closed this Oct 1, 2024
@Kocal
Copy link
Member

Kocal commented Oct 2, 2024

@Kocal Kocal reopened this Oct 2, 2024
@Kocal Kocal closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow output_path to be remote url
6 participants