diff --git a/framework/core/js/src/admin/app.ts b/framework/core/js/src/admin/app.ts new file mode 100644 index 000000000..007d866ea --- /dev/null +++ b/framework/core/js/src/admin/app.ts @@ -0,0 +1,8 @@ +import Admin from './AdminApplication'; + +const app = new Admin(); + +// @ts-ignore +window.app = app; + +export default app; diff --git a/framework/core/js/src/admin/index.js b/framework/core/js/src/admin/index.js index d5212c69a..7aa4d0570 100644 --- a/framework/core/js/src/admin/index.js +++ b/framework/core/js/src/admin/index.js @@ -1,9 +1,4 @@ -import AdminApplication from './AdminApplication'; - -const app = new AdminApplication(); - -// Backwards compatibility -window.app = app; +import app from './app'; export { app }; diff --git a/framework/core/js/src/forum/app.ts b/framework/core/js/src/forum/app.ts new file mode 100644 index 000000000..02daea014 --- /dev/null +++ b/framework/core/js/src/forum/app.ts @@ -0,0 +1,8 @@ +import Forum from './ForumApplication'; + +const app = new Forum(); + +// @ts-ignore +window.app = app; + +export default app; diff --git a/framework/core/js/src/forum/index.js b/framework/core/js/src/forum/index.js index bdd5289d4..5cb3ff1a3 100644 --- a/framework/core/js/src/forum/index.js +++ b/framework/core/js/src/forum/index.js @@ -1,12 +1,7 @@ import 'expose-loader?punycode!punycode'; import 'expose-loader?ColorThief!color-thief-browser'; -import ForumApplication from './ForumApplication'; - -const app = new ForumApplication(); - -// Backwards compatibility -window.app = app; +import app from './app'; export { app };