fusionalliance/starter-kit

Discuss: Import vs Require syntax

Closed this issue · 2 comments

Discuss: Import vs Require syntax

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.

Import syntax decided.