Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-plugin-purgewxss

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-plugin-purgewxss

### 支持情况 因项目较老,暂时只考虑到Taro2.x版本

  • 0.0.1-alpha.1
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Webpack Plugin PurgeWxss

支持情况

因项目较老,暂时只考虑到Taro2.x版本

介绍

全局引入的样式会造成打包时每个样式文件都存在,但是实际很多组件和页面未只用到,故书写该组件以降低部分打包体积。

使用

 const PurgeWxssPlugin = require('webpack-plugin-purgewxss');

 // config.js
 mini: {
    postcss: {
    },
    webpackChain(chain) {
      // ...
      chain.plugin('PurgeWxss Plugin').use(PurgeWxssPlugin, [{ name: 'test' }]);
    },
 }

待解决

  • 1. 由于emit事件得到的编译后代码无法获知部分动态生成的class,类似{{anonymousState__temp}},所以暂定文件内只要存在动态class统一不做处理。(有较好的解决方案期望期望告知~)

FAQs

Package last updated on 26 Jan 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