rollup-plugin-url-import

0.4.0 • Public • Published

Rollup plugin that resolves URL imports

Software License Issues Latest Version

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:

  1. Clone the project.
  2. npm install
  3. npm run build
  4. npm run test

Credits

License

The MIT License (MIT). Please see License File for more information.

/rollup-plugin-url-import/

    Package Sidebar

    Install

    npm i rollup-plugin-url-import

    Weekly Downloads

    0

    Version

    0.4.0

    License

    MIT

    Unpacked Size

    9.7 kB

    Total Files

    6

    Last publish

    Collaborators

    • thgh