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

ui: rename .js files containing JSX to .jsx #2863

Open
miguelgrc opened this issue Nov 23, 2023 · 2 comments
Open

ui: rename .js files containing JSX to .jsx #2863

miguelgrc opened this issue Nov 23, 2023 · 2 comments

Comments

@miguelgrc
Copy link
Contributor

miguelgrc commented Nov 23, 2023

Currently, all JavaScript files in CAP are .js, regardless of whether they contain JSX or not. Those that contain JSX syntax should have the .jsx extension. This way we will be able to remove the custom compatibility configs we have in vite.config.js and to replace @vitejs/plugin-react with @vitejs/plugin-react-swc (i.e. swc instead of babel for the dev server) for faster dev server updates and HMR. We can simply use something like https://gist.github.com/parties/90cdf35f9a3d05bea6df76dc83a69641 to automatically rename all files containing react code, but we should check that everything has been renamed correctly manually afterwards

@hacksh4w
Copy link

can i please be assigned this issue?

@miguelgrc
Copy link
Contributor Author

Hi :), thanks for your interest in the project! It's awesome that you want to collaborate and you're most welcome to do so. However I wouldn't recommend starting working on this task for now. We are working on externalizing part of the application (what we call the form builder) as a new standalone library, react-formule, so many files will be changed or removed after we merge #2859.

If you want, though, you can have a look at the issues for Formule and see if you find anything interesting (maybe cern-sis/react-formule#23 or even cern-sis/react-formule#21 or cern-sis/react-formule#20 if you are interested in playing a bit with RJSF). Let me know if you want to work on anything else or if you need any help.

Cheers,
Miguel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants