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

webpack-variable-replacer-plugin

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-variable-replacer-plugin

easy to change css variable with only one function

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

webpack-variable-replacer-plugin

easy to change css variable with only one function:window.replaceVariable, config example: react-starter

how to (3 steps)

  • step1 import plugin

const VariableReplacerPlugin =require('webpack-variable-replacer-plugin');

  • step2 define plugin in webpack plugin config

new VariableReplacerPlugin({matchVariables: {main: '#456789'}})

  • step3 call function anywhere you like

window.replaceStyleVariable({main:'#987654'})

zh-cn (中文说明)

简单三步实现网页换肤功能

  • 第一步 引入包

const VariableReplacerPlugin =require('webpack-variable-replacer-plugin');

  • 第二步 定义webpack plugin

new VariableReplacerPlugin({matchVariables: {main: '#456789'}})

  • 第三步 任何地方调用方法实现换肤

window.replaceStyleVariable({main:'#987654'})

Keywords

variable

FAQs

Package last updated on 25 Sep 2019

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