kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

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

Open rtibbles opened this issue 3 years ago • 0 comments

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 avatar Jan 28 '22 16:01 rtibbles