/esm-babel-plugin-module-resolver-issue

See https://github.com/standard-things/esm/issues/810

Primary LanguageJavaScript

esm-babel-plugin-module-resolver-issue

Setup

npm i && npm run dev

Issue

Either the module alias isn't available or top-level await does not work.

1st try (doesn't work):

nodemon -r esm -r @babel/register src/index.js 

2nd try (doesn't work):

nodemon -r @babel/register -r esm src/index.js 

3rd try (works, but no alias possible):

nodemon -r esm src/index.js 

src/router.js

- import user from '@routes/hello-world.route'
+ import user from './routes/hello-world.route'