Skip to content

Commit

Permalink
fix: unexpected remove of postcssOptions.plugins (#4955)
Browse files Browse the repository at this point in the history
* fix: unexpected remove of postcssOptions.plugins

* chore: version
  • Loading branch information
ClarkXia authored Nov 23, 2021
1 parent 8dcbe14 commit d329e2d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/build-user-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.7

- [fix] undefined `postcssOptions.plugins`

## 1.1.6

- [fix] format `postcssOptions`
Expand Down
2 changes: 1 addition & 1 deletion packages/build-user-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@builder/user-config",
"version": "1.1.6",
"version": "1.1.7",
"description": "Includes methods which are releated to set base user config for framework",
"homepage": "",
"license": "MIT",
Expand Down
7 changes: 5 additions & 2 deletions packages/build-user-config/src/userConfig/postcssOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ module.exports = (config, postcssOptions) => {
}
});
// remove k-v plugins options
delete postcssOptions.plugins;
const originalPostcssOptions = {
...postcssOptions,
};
delete originalPostcssOptions.plugins;
// modify css rules
styleRules.forEach((ruleName) => {
if (checkPostcssLoader(config, ruleName)) {
Expand All @@ -87,7 +90,7 @@ module.exports = (config, postcssOptions) => {
...finalPostcssOptions,
postcssOptions: {
...finalPostcssOptions.postcssOptions,
...postcssOptions,
...originalPostcssOptions,
plugins: postcssPlugins,
}
};
Expand Down

0 comments on commit d329e2d

Please sign in to comment.