Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@aofl/html-webpack-purify-internal-css-plugin
Advanced tools
This is a plugin for [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin). It uses [PurifyCSS](https://github.com/purifycss/purifycss) to remove all unused css rules from internal styles of the generated html.
This is a plugin for html-webpack-plugin. It uses PurifyCSS to remove all unused css rules from internal styles of the generated html.
npm i -D @aofl/html-webpack-purify-internal-css-plugin
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPurifyInternalCssPlugin = require('@aofl/html-webpack-purify-internal-css-plugin');
module.export = {
...
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackPurifyInternalCssPlugin()
]
}
Level specifies pruning strategy.
option | Description |
---|---|
auto | This is the default behavior. It prunes unused css rules based on the generated html and the purgeCss options. |
whitelist | Only keep whitelisted rules. |
all | Prune everything |
none | Prune nothing. (Useful for development to be able to toggle classes in devtools) |
module.export = {
...
plugins: [
new HtmlWebpackPurifyInternalCssPlugin({
level: process.env.NODE_ENV === 'development'? 'none': 'auto'
})
]
}
module.export = {
...
plugins: [
new HtmlWebpackPurifyInternalCssPlugin({
level: process.env.NODE_ENV === 'development'? 'none': 'auto',
purgeCss: {
whitelist?: Array<string>,
whitelistPatterns?: Array<RegExp>,
whitelistPatternsChildren?: Array<RegExp>,
keyframes?: boolean,
fontFace?: boolean,
rejected?: boolean
}
})
]
}
FAQs
This is a plugin for [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin). It uses [PurifyCSS](https://github.com/purifycss/purifycss) to remove all unused css rules from internal styles of the generated html.
We found that @aofl/html-webpack-purify-internal-css-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.