Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module. Thankfully, Github provides a means to do this. Add a dependency to the
```json
{
"devDependencies": {
"cssnano-webpack-plugin": "webpack-contrib/cssnano-webpack-plugin#{id}/head"
"css-minimizer-webpack-plugin": "webpack-contrib/css-minimizer-webpack-plugin#{id}/head"
}
}
```
Expand All @@ -149,7 +149,7 @@ Where `{id}` is the # ID of your Pull Request.

## Contributor License Agreement

When submitting your contribution, a CLA (Contributor License Agreement) bot will come by to verify that you signed the [CLA](https://cla.js.foundation/webpack-contrib/cssnano-webpack-plugin).
When submitting your contribution, a CLA (Contributor License Agreement) bot will come by to verify that you signed the [CLA](https://cla.js.foundation/webpack-contrib/css-minimizer-webpack-plugin).
If it is your first time, it will link you to the right place to sign it.
However, if you have committed your contributions using an email that is not the same as your email used on GitHub, the CLA bot can't accept your contribution.

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ about: Something went awry and you'd like to tell us about it.
- Node Version:
- NPM Version:
- webpack Version:
- cssnano-webpack-plugin Version:
- css-minimizer-webpack-plugin Version:

### Expected Behavior

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/FEATURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ about: Suggest an idea for this project
- Node Version:
- NPM Version:
- webpack Version:
- cssnano-webpack-plugin Version:
- css-minimizer-webpack-plugin Version:

### Feature Proposal

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/MODIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ about: Would you like something work differently? Have an alternative approach?
- Node Version:
- NPM Version:
- webpack Version:
- cssnano-webpack-plugin Version:
- css-minimizer-webpack-plugin Version:

### Expected Behavior / Situation

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cssnano-webpack-plugin
name: css-minimizer-webpack-plugin

on:
push:
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

This plugin uses [cssnano](https://cssnano.co) to optimize and minify your CSS.

Fully integrated in Webpack ecosystem: based on compiler hooks, respecting default Webpack output sources and compatible with other plugins like _SourceMapDevToolPlugin_ or _webpack-subresource-integrity_.

Just like [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) but more accurate with source maps and assets using query string.

Works with Webpack 4+.
Just like [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) but more accurate with source maps and assets using query string, allows to cache and works in parallel mode.

## Getting Started

Expand Down Expand Up @@ -53,7 +49,9 @@ module.exports = {
};
```

This will enable CSS optimization only in production mode. If you want to run it also in development, put the plugin configuration in the `plugins` option array.
This will enable CSS optimization only in production mode.
If you want to run it also in development, put the plugin configuration in the `plugins` option array.

And run `webpack` via your preferred method.

## Options
Expand Down Expand Up @@ -270,10 +268,7 @@ Default configuration when enabled: `{ inline: false }`.

**Works only with `source-map`, `inline-source-map`, `hidden-source-map` and `nosources-source-map` values for the [`devtool`](https://webpack.js.org/configuration/devtool/) option.**

Why?

- `eval` wraps modules in `eval("string")` and the minimizer does not handle strings.
- `cheap` has not column information and minimizer generate only a single line, which leave only a single mapping.
Why? Because CSS support only these source map types.

The plugin respect the [`devtool`](https://webpack.js.org/configuration/devtool/) and using the `SourceMapDevToolPlugin` plugin.
Using supported `devtool` values enable source map generation.
Expand Down
Loading