Go ECMAScript 2049
See original GitHub issueThis is an Enhancement request
In a previous position, I partially based my production code on Create React App (yes, really), and that was hard because of the @Facebook habit of writing and checking in Node.js 6 era code. Poor git cannot coalesce the enormous changes required to turn the code style from 18 months ago into ES.Next. For those of us stupid enough to try that on, here are some observations:
All code written by a humans should be ES.Next, and almost all in reusable classes
I spent 100s of hours figuring out how this should be done, and here are some silly tweets nobody has to read: https://twitter.com/HaRuD/status/933909838320586752 https://twitter.com/HaRuD/status/934183488575737859
This realization leads us to:
- Rollup can read its config file from a CommonJS module
node:…
This allows for zero-configuration independent packages, possibly in a Lerna monolithic repository - App-wide config scripts dependencies are either transpiled by a script launched from a dependency, or uglier pre-transpiled by an npm script command to an executable targeting supported Node.js versions, a transpilation that is checked-in so that users never have to wait for that annoying babel-node launch that is further not production-ready and leads straight to symlinked-mysterious-BabelJS-hell
- A runClass module helper for that pesky first class instantiation and async transition
- If the app is wrapped in an outermost async function, any and all exceptions can be dispatched to the @Facebook ceo’s office or such
react-scripts and what not can be wrapped into this right away within 2 hours work, with semicolons and all, for that nice gradual migration we are used to with ReactJS
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Node.js 6 is going to be LTS until April 2019. A way would be to drop support for it now and use Node.js 8
Code looks miserable because there is no import or async
@facebook is looking at 18 months of regret
The way to go is to have an transpile-if-outdated script in a dependency and make extensive use of Lerna. Doing it in-module makes it not possible to have files as external and a host of difficult unpleasentries nobody needs. I came up with like 20 variants so far, I dislike every single one
Thank you
Since you are so cool and full of ideas - please, make your own tool and share with us. I want to use bleeding-edge super 420 noscope swag tool to create my React apps. /s