Fix wonky default export in accounts-base/client_main.js.

Follow-up to 8d4f07a802.
This commit is contained in:
Ben Newman
2018-09-11 12:09:19 -04:00
parent 3d4fb7a8ad
commit 53029c10b9
2 changed files with 14 additions and 13 deletions

View File

@@ -1,4 +1,7 @@
import { AccountsClient, AccountsTest } from "./accounts_client.js";
import {
AccountsClient,
AccountsTest,
} from "./accounts_client.js";
/**
* @namespace Accounts
@@ -14,14 +17,12 @@ Accounts = new AccountsClient();
*/
Meteor.users = Accounts.users;
const exp = { AccountsClient };
if (Meteor.isPackageTest) {
// Since this file is the main module for the client version of the
// accounts-base package, properties of non-entry-point modules need to
// be re-exported in order to be accessible to modules that import the
// accounts-base package.
exp.AccountsTest = AccountsTest;
}
export default exp;
export {
Accounts,
AccountsClient,
AccountsTest,
// For backwards compatibility. Note that exporting an object as the
// default export is *not* the same as exporting its properties as named
// exports, as was previously assumed.
exports as default,
};

View File

@@ -1,4 +1,4 @@
import {AccountsServer} from "./accounts_server.js";
import { AccountsServer } from "./accounts_server.js";
/**
* @namespace Accounts