diff --git a/app/assets/javascripts/discourse/app/lib/load-morphlex.js b/app/assets/javascripts/discourse/app/lib/load-morphlex.js new file mode 100644 index 00000000000..eb2c0ea7e46 --- /dev/null +++ b/app/assets/javascripts/discourse/app/lib/load-morphlex.js @@ -0,0 +1,7 @@ +/* +Plugins & themes are unable to async-import npm modules directly. +This wrapper provides them with a way to use morphlex, while keeping the `import()` in core's codebase. +*/ +export default async function loadMorphlex() { + return await import("morphlex"); +}