New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

custom-property-extract-loader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom-property-extract-loader

Webpack loader for custom-property-extract

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-69.23%
Maintainers
1
Weekly downloads
 
Created
Source

custom-property-extract-loader

Webpack loader for custom-property-extract.

Install

Requires custom-property-extract as peer dependency.

npm install --save-dev custom-property-extract custom-property-extract-loader

Usage

In require:

const variables = require('!custom-property-extract!./style.scss');

In webpack config:

{
  module: {
    loaders: [
      {
        test: /.s[ca]ss$/,
        loader: 'custom-property-extract-loader'
      }
    ]
  }
}

Beware! If you are using commonly used loaders such as css-loader or scss-loader to actually generate and import stylesheets content, using the loader in the webpack config is not recommended unless you give webpack a way to distinguish stylesheets used for custom properties definitions and stylesheets used for styling (e.g. by tweaking the test properties).

Options

NameTypeRequiredDefaultDescription
mode{String}false"simple"Output mode ("simple", "full")
syntax{String}false"css"Syntax of the source stylesheet ("css", "scss", "sass")
prefix{Boolean}falsetrueDetermines whether to prefix custom properties with --.

Keywords

FAQs

Package last updated on 19 Apr 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc