overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

fix: append trailing slash to PUBLIC_PATH #173

Closed arbrandes closed 11 months ago

arbrandes commented 11 months ago

This reverts ae60b2db08ef77a5dfb42b0ec9c2671c59af08a7. 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 commented 11 months ago

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

regisb commented 11 months ago

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