1.0.0-beta.3 • Published 5 years ago

rollup-plugin-auto-named-exports v1.0.0-beta.3

Weekly downloads
85
License
ISC
Repository
github
Last release
5 years ago

rollup-plugin-auto-named-exports

Base on rollup-plugin-commonjs, auto fix Error: "name is not exported by module"

why

Error: "[name] is not exported by [module]"

rollup-plugin-commonjs plugin need you manual specify unresolvable named exports, it's too trivial.

this plugin can auto do something like namedExports

install

npm install rollup-plugin-auto-named-exports --save-dev

how to use

import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import autoNamedExports from 'rollup-plugin-auto-named-exports';

export default {
  plugins: [
    resolve(),
    commonjs({
      namedExports: {
        // no need manual custom
      }
    }),
    autoNamedExports()
  ]
}

issue

tree shaking not work