New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

razzle-plugin-less

Package Overview
Dependencies
Maintainers
2
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

razzle-plugin-less

This package contains a plugin for using [LESS](http://lesscss.org/) with Razzle

latest
Source
npmnpm
Version
4.2.18
Version published
Maintainers
2
Created
Source

razzle-plugin-less

This package contains a plugin for using LESS with Razzle

Usage in Razzle Projects

yarn add razzle-plugin-less --dev

With the default options

// razzle.config.js

module.exports = {
  plugins: ['less'],
};

With custom options

// razzle.config.js

module.exports = {
  plugins: [
    {
      name: 'less',
      options: {
        postcss: {
          dev: {
            sourceMap: false,
          },
        },
      },
    },
  ],
};

Options

Please remember that custom options will extends default options using Object.assign. Array such as postcss.plugins WILL NOT BE EXTENDED OR CONCATED, it will override all default plugins.

postcss

default

{
  dev: {
    sourceMap: true,
    ident: 'postcss',
  },
  prod: {
    sourceMap: false,
    ident: 'postcss',
  },
  plugins: [
    PostCssFlexBugFixes,
    autoprefixer({
      browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9'],
      flexbox: 'no-2009',
    }),
  ],
}

Set dev to add config to postcss in development. Set prod to add config to postcss in production.

See postcss loader options to override configs.

less

default

{
  dev: {
    sourceMap: true,
    includePaths: [paths.appNodeModules],
  },
  prod: {
    sourceMap: false,
    includePaths: [paths.appNodeModules],
  },
}

Set dev to add config to postcss in development. Set prod to add config to postcss in production.

See less loader options to override configs.

css

default

{
  dev: {
    sourceMap: true,
    importLoaders: 1,
    modules: false,
  },
  prod: {
    sourceMap: false,
    importLoaders: 1,
    modules: false,
    minimize: true,
  },
}

Set dev to add config to postcss in development. Set prod to add config to postcss in production.

See css loader options to override configs.

style

default

{
}

Style loader only used in development environment.

See style loader options to override configs.

resolveUrl

default

{
  dev: {},
  prod: {},
}

Set dev to add config to postcss in development. Set prod to add config to postcss in production.

See resolve url loader options to override configs.

FAQs

Package last updated on 25 Oct 2022

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