Détail du package

rollup-plugin-legacy

rollup28.9kMITobsolète1.0.0

This package has been deprecated and is no longer maintained. Please use @rollup/plugin-legacy.

Add export statements to plain scripts

rollup

readme

rollup-plugin-legacy

Add export declarations to legacy non-module scripts.

Installation

npm install --save-dev rollup-plugin-legacy

Usage

// rollup.config.js
import legacy from 'rollup-plugin-legacy';

export default {
  entry: 'src/main.js',
  dest: 'bundle.js',
  format: 'iife',
  plugins: [
    legacy({
      // add a default export, corresponding to `someLibrary`
      'vendor/some-library.js': 'someLibrary',

      // add named exports
      'vendor/another-library.js': {
        foo: 'anotherLib.foo',
        bar: 'anotherLib.bar',
        baz: 'anotherLib.baz'
      }
    })
  ]
}

License

MIT

changelog

rollup-plugin-script changelog

1.0.0

  • First release