rollup-plugin-url-import
v0.4.0
Published
Rollup plugin that resolves url imports
Downloads
9
Maintainers
Readme
Rollup plugin that resolves URL imports
Installation
npm install --save-dev rollup-plugin-url-import
Usage
// rollup.config.js
import urlImport from 'rollup-plugin-url-import'
export default {
input: 'input.js',
output: { file: 'output.js', format: 'esm' },
plugins: [
urlImport()
]
}
// input.js
import 'https://deno.land/thumb.ts'
import leftPad from 'https://dev.jspm.io/left-pad'
console.log(leftPad('test', 8))
Options
The cache option is not yet implemented.
urlImport({
// Cache fetched modules (default: false)
cache: true,
// Cache fetched modules in specified folder
cache: '~/.deno/deps',
// Enable output of fetched urls (default: false)
verbose: true,
// Fetch named modules from jspm.io (default: false)
jspm: true
})
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Contributions and feedback are very welcome.
To get it running:
- Clone the project.
npm install
npm run build
npm run test
Credits
License
The MIT License (MIT). Please see License File for more information.