🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

cssexchangeloader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssexchangeloader

this is a webpack loader for css to exchange

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
4
-60%
Maintainers
1
Weekly downloads
 
Created
Source

cssExchangeLoader

这是一个webpack插件,用来替换css的颜色,方便做主题切换

安装方法

npm i|install (--save-dev) cssexchangeloader

使用方法

在webpack的配置文件中做如下配置:

{
    test: /(\.css$)|(\.scss$)/,  //只能是css scss或者less文件
    use: [
            {
                loader: path.resolve(root,'loader/cssExchangeLoader.js'), //引入loader
                options: {
                    target: 'white', //选择要替换掉的样式值,可以是任何字符串
                    alternative: 'black' //输入新的样式值,可以是任何字符串
                }
            }
        ],
    exclude: [/node_modules/,/loader/] //排除一些没用的目录
},

Keywords

webpack

FAQs

Package last updated on 30 Jul 2020

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