https://github.com/uppercod/rollup-plugin-import-url
https://github.com/uppercod/rollup-plugin-import-url
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/uppercod/rollup-plugin-import-url
- Owner: UpperCod
- Created: 2020-08-23T00:22:53.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-31T04:47:40.000Z (almost 6 years ago)
- Last Synced: 2025-03-16T20:37:50.161Z (over 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rollup-plugin-import-url
Import ESM modules from URL for local use and be processed by rollup, allowing to apply tree-shaking on non-local resources.
**If the module to be imported has local dependencies, these dependencies will be used**.
## Example
```js
export { h } from "https://unpkg.com/atomico";
```
```js
import { h } from "https://unpkg.com/atomico";
console.log(h);
```
## Install
```
npm install rollup-plugin-import-url
```
## Usage
```js
import importUrl from "rollup-plugin-import-url";
export default {
input: "http://localhost:8080",
plugins: [importUrl()],
};
```