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

Move bootstrapping of __webpack_public_path__ into automatically inserted code rather than relying on an import #9062

Closed
rtibbles opened this issue Jan 28, 2022 · 1 comment · Fixed by #12848
Assignees
Labels
DEV: dev-ops Continuous integration & deployment TAG: tech update / debt Change not visible to user

Comments

@rtibbles
Copy link
Member

Currently the webpack variable __webpack_public_path__ is setup in default frontend and kolibri_module.js by importing a special module and executing a function.

It would be better if this were automatically inserted by the webpack build process to properly set this variable for all code (at the moment non-kolibri_module bundles like the side nav items don't get this set).

One caveat is that currently this code relies on being run at a certain point in the life cycle of default frontend - it would be better instead to defer entirely to a global window attribute that has been set.

This may still fail in some cases, so it should do so gracefully and give a debug message if so.

@rtibbles rtibbles added the DEV: dev-ops Continuous integration & deployment label Jan 28, 2022
@rtibbles rtibbles added the TAG: tech update / debt Change not visible to user label Jul 28, 2022
@rtibbles rtibbles added this to the upcoming major milestone Jul 28, 2022
@rtibbles rtibbles self-assigned this Jul 27, 2024
@rtibbles
Copy link
Member Author

rtibbles commented Nov 7, 2024

Seems like this may just be accomplished by using this setting that was introduced in webpack 5: https://webpack.js.org/guides/public-path/#automatic-publicpath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: dev-ops Continuous integration & deployment TAG: tech update / debt Change not visible to user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant