Discuss: Import vs Require syntax
Closed this issue · 2 comments
dreafusion commented
Discuss: Import vs Require syntax
davidragsdale commented
Currently, import
adds additional Babel configuration that can steepen the learning curve. require
also follows standard browser scoping as far as global variables are concerned (like adding a non-module script tag) but import
creates an implicit scope. import
is also likely to be delayed in Node LTS until April (as of 12/2/19). That being said, import
is a better practice and moves us toward browser modules which are supported in all evergreen browsers. If we plan on adding legacy builds down the road, import
should be prioritized.
dreafusion commented
Import syntax decided.