webpack-less-theme

1.0.3 • Public • Published

webpack-less-theme-plugin

A fork of webpack-less-theme-plugin, but uses reference imports instead.

Inject less variables to your less file. Support HMR.

Installation

$ npm i webpack-less-theme-plugin --save-dev

Usage

Add to webpack config.

// webpack.config.js
const LessThemePlugin = require('webpack-less-theme-plugin');

module.exports = {
  ...,
  plugins: [
    new LessThemePlugin({ theme: './blue.less' }),
  ],
};
// blue.less
@primary-color: blue;

Options

  • test - webpack's Condation.rule. Default is /\.less$/.
  • theme - less theme file.
  • cwd - Current working dir.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-less-theme

Weekly Downloads

64

Version

1.0.3

License

MIT

Unpacked Size

2.47 kB

Total Files

4

Last publish

Collaborators

  • hannaofsweden