From a76b0cebe7c3417a26e9af7acebb2137c014a3a4 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Fri, 14 Aug 2020 16:17:22 +0200 Subject: [PATCH] fix: Do not use module.exports and imports in the same file Otherwise we have an errors "exports" is read-only --- src/index.jsx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/index.jsx b/src/index.jsx index d2ae8f2d2..25051b549 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -202,9 +202,28 @@ const updateAccessToken = accessToken => { const proxiedAPI = createBarProxiedAPI(exposedAPI) -module.exports = { +const { + setBarCenter, + setBarLeft, + setBarRight, + BarCenter, + BarRight, + BarLeft, + setTheme +} = proxiedAPI + +const version = __VERSION__ + +export default { init, - version: __VERSION__, - ...proxiedAPI, + version, + setBarCenter, + setBarLeft, + setBarRight, + BarLeft, + BarRight, + BarCenter, + setTheme, + setLocale, updateAccessToken }