Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perform minimize after extract is finished #153

Merged
merged 6 commits into from
Jan 22, 2019
Merged

perform minimize after extract is finished #153

merged 6 commits into from
Jan 22, 2019

Conversation

kendrickw
Copy link
Contributor

Fixes #144

When option extract is true, performing CSS minification on the entire extracted file will produce better minification result than doing it on each chunk. (see minimize extract test case).

@codecov
Copy link

codecov bot commented Jan 21, 2019

Codecov Report

Merging #153 into master will increase coverage by 0.3%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #153     +/-   ##
=========================================
+ Coverage   94.73%   95.04%   +0.3%     
=========================================
  Files           8        8             
  Lines         228      242     +14     
  Branches       80       87      +7     
=========================================
+ Hits          216      230     +14     
  Misses         12       12
Impacted Files Coverage Δ
src/index.js 98.64% <100%> (+0.31%) ⬆️
src/postcss-loader.js 95.06% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b201582...bf1c116. Read the comment docs.

egoist and others added 5 commits January 23, 2019 02:19
Allow boolean plugins similar to how Rollup plugins work. In the Rollup plugins array you may write the following to only run a plugin for production usage:

```js
plugins: [
  (process.env.NODE_ENV === 'production' && terser())
]
```

This pull request allow the same approach for PostCSS plugins:

```js
plugins: [
  (process.env.NODE_ENV === 'production' && cssnano())
]
```

[Example of how Rollup has implemented this feature.](https://github.com/rollup/rollup/blob/f58d1e60a3da4b8470e5d56aa0caef2ecadec2b8/src/rollup/index.ts#L107)
@egoist egoist merged commit 20aeab4 into egoist:master Jan 22, 2019
bung87 pushed a commit to bung87/rollup-plugin-postcss that referenced this pull request Dec 3, 2019
* perform minimize after extract is finished

* Allow boolean plugins support (egoist#142)

Allow boolean plugins similar to how Rollup plugins work. In the Rollup plugins array you may write the following to only run a plugin for production usage:

```js
plugins: [
  (process.env.NODE_ENV === 'production' && terser())
]
```

This pull request allow the same approach for PostCSS plugins:

```js
plugins: [
  (process.env.NODE_ENV === 'production' && cssnano())
]
```

[Example of how Rollup has implemented this feature.](https://github.com/rollup/rollup/blob/f58d1e60a3da4b8470e5d56aa0caef2ecadec2b8/src/rollup/index.ts#L107)

* perform minimize after extract is finished

* tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants