Transform browser URL imports into Node compatible import/require statements using local dependencies.
npm install node-url-imports> Transform browser URL imports into Node compatible import/require statements using local dependencies.
!Travis
!npm
!License MIT

npm: npm install typified --save
cdn: https://cdn.jsdelivr.net/npm/typified@latest/src/index.js
As only require statements are catchable, all import statements first need to be transformed into their require equivalents – using something like Babel.
``console`
foo@bar:~$ node -r @babel/register index.js
Using the following .babelrc configuration:
`json`
{
"ignore": [],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
With the @babel/plugin-transform-modules-commonjs dependency loaded Babel only transform the import statements. After that you can include the node-url-imports module that'll monkey-patch the require function and transform all URL imports into their local dependency equivalents.
`console`
foo@bar:~$ node -r @babel/register -r node-url-imports index.js
Afterwards you can include other transpilers such as esm`.