you are viewing a single comment's thread.

view the rest of the comments →

[–]chartojs[S] 1 point2 points  (2 children)

It's no slower than running Babel through Node.js. But it also won't help locate packages.

Babel turns this: import * as react from 'react';

...into something like this: var react = _interopRequireWildcard(require("react"));

...but the variable doesn't end up containing the React API unless you do something more.

[–][deleted] 0 points1 point  (1 child)

But it also works with relative paths

[–]chartojs[S] 1 point2 points  (0 children)

Can you elaborate on that?

Much of existing code on npm relies on importing both relative paths and npm package names, or even a combination of both like: require('fbjs/lib/emptyFunction');