rollup-plugin-lessimporter

A rollup plugin providing ~ prefix as a way to tell less compiler that it should resolve path using a configured array of module directories.


License
BSD-3-Clause
Install
npm install rollup-plugin-lessimporter@0.2.0

Documentation

rollup-plugin-lessimporter

All Contributors

A rollup plugin providing ~ prefix as a way to tell less compiler that it should resolve path using a configured array of module directories.

How to install

yarn add -D rollup-plugin-lessimporter

How to use

import less from 'rollup-plugin-less';
import lessimporter from 'rollup-plugin-lessimporter';
import path from 'path';

export default {
  input: './src/index.js',
  output: {
    dir: './dist',
    format: 'cjs',
    sourcemap: true,
  },
  plugins: [
    lessimporter({
      paths: [path.resolve(__dirname, './node_modules'), path.resolve(__dirname, '../../node_modules')],
    }),
    less(),
  ],
};

Contributors

Thanks goes to these wonderful people (emoji key):

Hi.Billgo
Hi.Billgo

📖 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

BSD-3-Clause © OVH SAS and Billgo