This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@brickdoc/less-vars-loader
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@brickdoc/less-vars-loader

Forked from @hon2a/less-vars-loader, and add yarn workspaces supported.

Use

module.exports = {
  module: {
    rules: [
      {
        test: /\.vars\.less$/,
        use: '@brickdoc/less-vars-loader',
        options: {
          transform: ([key, value]) => [camelCase(key), /^\d+px$/.test(value) ? parseInt(value, 10) : value],
          lessOptions: { javascriptEnabled: true }
        }
      }
    ]
  }
}

Note: This loader needs to go before other loaders matching the test if there are any (e.g. when also using less-loader to load other .less files).

Readme

Keywords

none

Package Sidebar

Install

npm i @brickdoc/less-vars-loader

Weekly Downloads

2

Version

0.1.2

License

Apache-2.0

Unpacked Size

31.9 kB

Total Files

13

Last publish

Collaborators

  • borisding1994
  • jizhekai
  • shiyuhang
  • wizcas