Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle ES(flagsmith-es) and combine with standard CJS module (flagsmith) #226

Open
kyle-ssg opened this issue Apr 24, 2024 · 0 comments
Open
Assignees
Labels
good first issue Good for newcomers

Comments

@kyle-ssg
Copy link
Member

kyle-ssg commented Apr 24, 2024

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"
    }
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants