Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Files

Latest commit

9f64291 · Feb 16, 2022

History

History
52 lines (38 loc) · 1.45 KB

File metadata and controls

52 lines (38 loc) · 1.45 KB

rollup-plugin-less-tilde-importer

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

⚠️ This plugin is now deprecated. Please refer to rollup-plugin-styles.

Install

$ yarn add -D @ovh-ux/rollup-plugin-less-tilde-importer

Usage

// rollup.config.js
import less from 'rollup-plugin-less';
import lessTildeImporter from '@ovh-ux/rollup-plugin-less-tilde-importer';
import path from 'path';

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

Related

See more: https://github.com/rollup/plugins.

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

License

BSD-3-Clause © OVH SAS