diff --git a/js/modules/loki_app_dot_net_api.js b/js/modules/loki_app_dot_net_api.js index 8283f9522..f87c0dcc9 100644 --- a/js/modules/loki_app_dot_net_api.js +++ b/js/modules/loki_app_dot_net_api.js @@ -478,7 +478,7 @@ const serverRequest = async (endpoint, options = {}) => { }; // the core ADN class that handles all communication with a specific server -export default class LokiAppDotNetServerAPI { +class LokiAppDotNetServerAPI { constructor(ourKey, url) { this.ourKey = ourKey; this.channels = []; @@ -2314,3 +2314,7 @@ class LokiPublicChannelAPI { return false; } } + +// These files are expected to be in commonjs so we can't use es6 syntax :( +// If we move these to TS then we should be able to use es6 +module.exports = LokiAppDotNetServerAPI; diff --git a/js/modules/loki_message_api.js b/js/modules/loki_message_api.js index c05ff6cf5..18912666f 100644 --- a/js/modules/loki_message_api.js +++ b/js/modules/loki_message_api.js @@ -67,7 +67,7 @@ async function _retrieveNextMessages(nodeData, pubkey) { return result.messages || []; } -export default class LokiMessageAPI { +class LokiMessageAPI { constructor(ourKey) { this.jobQueue = new window.JobQueue(); this.sendingData = {}; @@ -610,3 +610,7 @@ export default class LokiMessageAPI { // no, our caller already handles this... } } + +// These files are expected to be in commonjs so we can't use es6 syntax :( +// If we move these to TS then we should be able to use es6 +module.exports = LokiMessageAPI; diff --git a/js/modules/loki_public_chat_api.js b/js/modules/loki_public_chat_api.js index f2a368e15..61b96a1ae 100644 --- a/js/modules/loki_public_chat_api.js +++ b/js/modules/loki_public_chat_api.js @@ -3,7 +3,7 @@ const EventEmitter = require('events'); const nodeFetch = require('node-fetch'); const LokiAppDotNetAPI = require('./loki_app_dot_net_api'); -export default class LokiPublicChatFactoryAPI extends EventEmitter { +class LokiPublicChatFactoryAPI extends EventEmitter { constructor(ourKey) { super(); this.ourKey = ourKey; @@ -199,3 +199,7 @@ export default class LokiPublicChatFactoryAPI extends EventEmitter { ); } } + +// These files are expected to be in commonjs so we can't use es6 syntax :( +// If we move these to TS then we should be able to use es6 +module.exports = LokiPublicChatFactoryAPI;