From 7ec968f5b4d06a44515b1610339b6b8c4c60c6d7 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Fri, 5 May 2023 11:22:47 +0100 Subject: [PATCH] Fix ESM (#828) --- src/index.mjs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/index.mjs b/src/index.mjs index ed4f486ba..c6df8fc18 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -1,11 +1,4 @@ -import { createRequire } from 'module'; -const require = createRequire(import.meta.url); -/** - * Simple facade for consuming a REST API endpoint. - * - * @external RestClient - * {@link https://github.com/ngonzalvez/rest-facade} - */ -export const ManagementClient = require('./management'); -export const AuthenticationClient = require('./auth'); -export default { ManagementClient, AuthenticationClient } +import mod from './index.js'; + +export const { ManagementClient, AuthenticationClient } = mod; +export default { ManagementClient, AuthenticationClient };