-
Notifications
You must be signed in to change notification settings - Fork 969
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
Adds deprecation notice if using Vite but have .js files when you should have .jsx #8712
Conversation
@dac09 We could have this warning run during Unless we |
Thanks Rob, leaving a couple of comments :) |
Yeah I think on dev is enough. When we remove JSX-In-JS, It'll fail automatically (I think). |
Co-authored-by: Daniel Choudhury <dannychoudhury@gmail.com>
Suggestions added, here's the new output: Just need to coordinate so that either @jtoar names the codemod like that, or I update the output to match the real name. |
Updated to match the codemod name! |
Does a simple search for
App.js
,Routes.js
,pages
andcomponents
that have a.js
extension. An app will have legitimate JS-only files with a.js
extension so we don't search ALL ofweb/src
. We also don't search the contents of the files for JSX tags, which may be overkill, and may slow down startup depending on how many files there are.If the dev is seeing this error erroneously (because they have real JS-only files in
web/src/pages
orweb/src/components
it can be disabled with aREDWOOD_DISABLE_JS_DEPRECATION_NOTICE
ENV var.Questions
.js
files actually not work at all in 7.0.0, or will you just not have an optimal experience (like fast reload)?.js
files will technically still work, maybe this notice should be reworded to something about "recommend" and "optimal experience" and actually keep it forever, not remove it as of 7.0?