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

fix: append trailing slash to PUBLIC_PATH #173

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

arbrandes
Copy link
Collaborator

This reverts ae60b2d. We depend heavily on Webpack's publicPath for everything to work in MFEs that are hosted in sub-paths. This variable affects many things, including URLs that are automatically generated for things like static assets or lazily loaded chunks of code. If the trailing slash is not appended to, say, /learning, a React.lazy() will try to fetch this from Caddy, and fail:

/learning210.3f8d0b2a9dbf3b1f1e69.js

While this can (and probably should) be dealt with in frontend-platform, we do it here for now.

This reverts ae60b2d.  We depend
heavily on Webpack's `publicPath` for everything to work in MFEs that
are hosted in sub-paths.  This variable affects many things, including
URLs that are automatically generated for things like static assets or
lazily loaded chunks of code.  If the trailing slash is not appended to,
say, `/learning`, a React.lazy() will try to fetch this from Caddy, and
fail:

`/learning210.3f8d0b2a9dbf3b1f1e69.js`

While this can (and probably should) be dealt with in frontend-platform,
we do it here for now.
@arbrandes arbrandes requested a review from regisb December 6, 2023 21:36
@arbrandes
Copy link
Collaborator Author

@regisb, this is also necessary for Quince. Is nightly going to be pulled in again before release, or should I create a backport?

@regisb
Copy link
Contributor

regisb commented Dec 7, 2023

No worries, I'll rebase the Quince branch right on top of nightly after we merge this.

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

Successfully merging this pull request may close these issues.

2 participants