discourse/app/assets/javascripts/app-boot.js
Robin Ward 612284cef3
DEV: Remove Discourse.RAW_TEMPLATES (#9630)
We were sharing `Discourse` both as an application object and a
namespace which complicated things for Ember CLI. This patch
moves raw templates into `__DISCOURSE_RAW_TEMPLATES` and adds
a couple helper methods to create/remove them.
2020-05-05 12:15:03 -04:00

17 lines
418 B
JavaScript

// discourse-skip-module
(function() {
if (window.unsupportedBrowser) {
throw "Unsupported browser detected";
}
let Discourse = requirejs("discourse/app").default;
// required for our template compiler
window.__DISCOURSE_RAW_TEMPLATES = requirejs(
"discourse-common/lib/raw-templates"
).__DISCOURSE_RAW_TEMPLATES;
// ensure Discourse is added as a global
window.Discourse = Discourse;
})();