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

feat(postcss): support postcss v8 with explict postcss installation #8546

Merged
merged 5 commits into from Dec 29, 2020

Conversation

clarkdo
Copy link
Member

@clarkdo clarkdo commented Dec 23, 2020

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

As we can't fully migrated to postcss 8 until postcss-preset-env supports v8

This pr is for supporting postcss config in nuxt if user installs postcss packages explicitly, required packages:

NOTE: postcss-preset-env is disabled in v8 config as it doesn't support postcss v8 for now.

yarn add --dev css-loader@^5.0.0 postcss@^8.1.10 postcss-import@^13.0.0 postcss-loader@^4.1.0 postcss-url@^10.1.1
# or
npm i --save-dev css-loader@^5.0.0 postcss@^8.1.10 postcss-import@^13.0.0 postcss-loader@^4.1.0 postcss-url@^10.1.1

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@@ -0,0 +1,208 @@
import fs from 'fs'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most code is duplicate of postcss.js, this is more handy when we fully migrate to v8: just remove postcss.js and rename postcss-v8.js

@codecov-io
Copy link

codecov-io commented Dec 23, 2020

Codecov Report

Merging #8546 (4565e5d) into dev (b2e38f5) will decrease coverage by 1.46%.
The diff coverage is 6.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #8546      +/-   ##
==========================================
- Coverage   67.46%   66.00%   -1.47%     
==========================================
  Files          91       92       +1     
  Lines        3916     4009      +93     
  Branches     1082     1104      +22     
==========================================
+ Hits         2642     2646       +4     
- Misses       1025     1095      +70     
- Partials      249      268      +19     
Flag Coverage Δ
unittests 66.00% <6.31%> (-1.47%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/webpack/src/utils/postcss-v8.js 1.12% <1.12%> (ø)
packages/webpack/src/utils/style-loader.js 74.57% <83.33%> (+0.03%) ⬆️

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 b2e38f5...4565e5d. Read the comment docs.

@clarkdo clarkdo requested a review from pi0 December 23, 2020 14:46
@clarkdo clarkdo marked this pull request as ready for review December 27, 2020 23:54
@pi0 pi0 merged commit fd0352c into dev Dec 29, 2020
@pi0 pi0 deleted the feat/postcss-8 branch December 29, 2020 12:16
@pi0 pi0 mentioned this pull request Jan 4, 2021
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants