Skip to content
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

File name extensions for es6 modules: .js or .mjs #862

Open
jonathanolson opened this issue Feb 6, 2020 · 3 comments
Open

File name extensions for es6 modules: .js or .mjs #862

jonathanolson opened this issue Feb 6, 2020 · 3 comments

Comments

@jonathanolson
Copy link
Contributor

From the planning doc:

( ) [DEV MEETING post-publication, Someone look into it, then decide as dev team] Should we use *.js or *.mjs in node? In the browser?
SR: See https://nodejs.org/api/esm.html for documentation about using import/export in Node (This may be experimental)
JO: Any objections to having all files end in .mjs?
CM: Would WebStorm know how to create .mjs files with .js templates. I don’t want to lose the ability to quickly create new files via templates.
JO: Let’s have someone look into WebStorm support
MK: All of my live templates are working in .mjs files without additional work
MK/JO: Let’s stay with .js for now and then batch convert to .mjs if there are benefits that are worth it
JO will create an issue and remove these notes.

I think this partially depends on Node.js support (#861). We can work around things with type:"module" top-level in package.json, so I'm not yet convinced that we need a change.

I'm going to mark as deferred for now.

@jbphet
Copy link
Contributor

jbphet commented Jun 4, 2020

We will revisit this in October when Node 14 comes out, since that will have support for ES6 style modules.

@ariel-phet
Copy link
Contributor

Calendar reminder added

@chrisklus
Copy link
Contributor

From 11/12/20 dev meeting:

We are cool with keeping .js as our file extension. Marking this as on-hold until #861 is complete.

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

No branches or pull requests

4 participants