flagsmith-js-client
flagsmith-js-client copied to clipboard
Bundle ES(flagsmith-es) and combine with standard CJS module (flagsmith)
At the moment, users who wish to use our es module need to install flagsmith-es. We should combine the modules together.
Doing this will also solve an issue with SvelteKit + OpenFeature, since Svelte expects es modules and OpenFeature comes bundled with flagsmith which is throwing errors expecting flagsmith to be a module.
I can't seem to figure out how to do this at the moment but it will involve adjusting rollup and instructing package.json on how to deal with this e.g.
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
"exports": {
".": {
"import": "./dist/mjs/index.js",
"require": "./dist/cjs/index.js"
}
},