-
Notifications
You must be signed in to change notification settings - Fork 14
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
Migrate node.js to ES6 modules #861
Comments
Both of our servers (bayes and phet-server) are using node v10.16.3. This is the previous LTS (current LTS is 12). I've tested ES6 imports with the flag and they work as long as files are named with the |
@zepumph @samreid @chrisklus think this would be good to discuss in developer meeting a couple weeks after the migration. |
Deferred till october when Node 14 can be installed on production servers. |
Calendar reminder added |
On Thursday, @zepumph and I volunteered to investigate converting to this pattern in our Node code, partly so that the 2-3 files which are used as preloads and require modules can be simplified as modules. I'll probably investigate this within the next few days. |
I identified a potential roadblock--we invoke chipper code via import X from '../chipper/js/grunt/Gruntfile.js';
export default X; then running
Does grunt prevent us from using ES6 modules? |
What happens when we try converting the top-level Gruntfile.js to use import? |
From 11/12/20 dev meeting: We like the sound of not needing grunt in the future, but we're not sure if this issue is a good enough reason to get rid of it. @zepumph volunteered to continue investigation here. |
PhET-iO wrappers will be handled over in https://github.com/phetsims/phet-io-wrappers/issues/399. Renaming this issue to just handle Node code on the project. |
We should investigate what is possible. Node 8.9.0 I think added support under an experimental flag, and Node 13+ looks like it includes it by default, so we may need to bump our node.js version for supporting this.
Entry from the planning doc:
The text was updated successfully, but these errors were encountered: