npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@haensl/rollup-plugin-local-resolve

1.0.5 • Public • Published

rollup-plugin-local-resolve

NPM

npm version Build Status

Rollup plugin to resolve relative imports from local folders without stating the index file. E.g.

import something from '../some-dir'.

Quick start

  1. Install the plugin
npm i -D @haensl/rollup-plugin-local-resolve
  1. Use it in your rollup.config.js
import localResolve from '@haensl/rollup-plugin-local-resolve';
 
export default {
  input: 'src/index.js',
  plugins: [
    localResolve()
  ],
  output: [
    {
      file: 'dist/index.cjs.js',
      format: 'cjs'
    },
    {
      file: 'dist/index.es.js',
      format: 'es'
    }
  ]
}

Credits

Changelog

License

install

npm i @haensl/rollup-plugin-local-resolve

Downloadsweekly downloads

26

version

1.0.5

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability