Modules
AirBNB JavaScript Style Guide: Modules
10.1 Always use modules (import/export) over a non-standard module system.
10.2 Do not use wildcard imports.
10.6 In modules with a single export, prefer default export over named export.
Interpretation: multiple exports allowed
Confusing as hell
ESM vs CommonJS vs ES6
If using export default
use import var from module
:
If you want the 21
, use import bar from './input';
Notes
is different from
Clearing Confusing
Last updated