Skip to content

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

Open
@miguelgrc

Description

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

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions