jsx in js
All of my files containing JSX are in
.js
files. Is there an easy fix for this when running?4 Replies
Ideally the files would be
.jsx
, but you can always use the --ext
flag to specify jsx manually
i.e.
My original file is a JS one which imports App.js.. and that imports subcomponents.
Do I need to rename everything?
Ideally yes,
.js
is semantically the wrong extension. If you're running unix, you can try https://unix.stackexchange.com/questions/708979/bash-recursive-rename-of-js-files-to-jsx to do this automatically. You can try https://gist.github.com/mustafaturan/32df16bb4c49fbd837f777000f4b9aa2 if you're on windows.kk thanks. nah, running linux. not a big deal to rename everything