You can const module = require('./folder') when the folder has an index.js but import module from './folder'; produces this error:
Error [ERR_MISSING_MODULE]: Cannot find module ../function
at /private/tmp/test-esm/main.mjs
at Object.<anonymous> (/private/tmp/test-esm/main.mjs)
at Module._compile (module.js:573:30)
Is this intended?
Thanks @mAAdhaTTah!
Patched https://github.com/standard-things/esm/commit/f0f26049cffca2fed1126623aab36844a825cd93.
Can't wait to upgrade from 0.2.2. 馃
Fixed by v0.6.0. Please note I've changed some usage instructions.
Most helpful comment
Thanks @mAAdhaTTah!
Patched https://github.com/standard-things/esm/commit/f0f26049cffca2fed1126623aab36844a825cd93.