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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ECMAScript Modules in examples and create-supertokens-app #973

Open
gopi-chand-reddy opened this issue Apr 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@gopi-chand-reddy
Copy link

馃殌 Feature

ESM is natively supported by modern JavaScript engines and browsers. If SuperTokens moves away from CJS to ESM, we can migrate our React projects from react-scripts to more modern tools like vite.

We migrated our project to vite with the help of viject. We had to manually replace require("reactRouterDom") with import * as reactRouterDom from "reactRouterDom".

Implementation details

  1. Modify create-supertokens-app to use vite instead of react-scripts.
  2. Ensure all the examples use ESM (import and import()) and not CJS (require and require())
@gopi-chand-reddy gopi-chand-reddy added the enhancement New feature or request label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant