discourse/lib/pretty_text/vendor-shims.js
Godfrey Chan 923b51ad25
DEV: add loader.js shims for packages used across bundles (#22703)
This adds a new `loaderShim()` function to ensure certain modules
are present in the `loader.js` registry and therefore runtime
`require()`-able.

Currently, the classic build pipeline puts a lot of things in the
runtime `loader.js` registry automatically. For example, all of
the ember-auto-import packages are in there.

Going forward, and especially as we switch to the Embroider build
pipeline, this will not be guarenteed. We need to keep an eye on
what modules (packages) our "external" bundles (admin, wizard,
markdown-it, plugins, etc) are expecting to be present and put
them into the registry proactively.
2023-08-09 12:04:41 +01:00

22 lines
470 B
JavaScript

define("@embroider/macros", ["exports", "require"], function (
__require__,
__exports__
) {
__exports__.importSync = __require__;
});
define("discourse-common/lib/loader-shim", ["exports", "require"], function (
__exports__,
__require__
) {
__exports__.default = (id, callback) => {
if (!__require__.has(id)) {
define(id, callback);
}
};
});
define("xss", ["exports"], function (__exports__) {
__exports__.default = window.filterXSS;
});