Babel 7 plugin to transpile import() to a require(), for node
npm install babel-plugin-dynamic-import-node-syncBabel 7 plugin to transpile async import() to sync a require(), for node. Matches the proposed spec.
I am using it for server-side rendering.
babel-plugin-dynamic-import-node-sync
```
import(SOURCE) => require(SOURCE)
babel-plugin-dynamic-import-node
``
import(SOURCE) => Promise.resolve().then(() => require(SOURCE))
`sh`
$ npm install babel-plugin-dynamic-import-node-sync --save-dev
.babelrc
`json`
{
"plugins": ["dynamic-import-node-sync"]
}
`sh``
$ babel --plugins dynamic-import-node-sync script.js