Socket
Book a DemoInstallSign in
Socket

@brickdoc/less-vars-loader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brickdoc/less-vars-loader

Forked from [@hon2a/less-vars-loader](https://github.com/hon2a/less-vars-loader), and add yarn workspaces supported.

latest
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

@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).

FAQs

Package last updated on 02 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts