npm.io
0.0.8 • Published 6 years ago

babel-plugin-third-party-imports

Licence
MIT
Version
0.0.8
Deps
2
Size
3 kB
Vulns
0
Weekly
0
Stars
791

babel-plugin-third-party-imports

Appends https://third_party/ to all imports that reference packages.

For example

import * from 'something';

Becomes

import * from 'https://third_party/?name=something&from=/path/to/file';

This is useful because imports that aren't urls or relative paths are invalid in browsers. Transforming them allows a server or proxy to redirect them to a compiled bundle.