Skip to content

Commit

Permalink
feat!(cssnano): remove YAML config support
Browse files Browse the repository at this point in the history
Fix #1473
  • Loading branch information
ludofischer committed Mar 14, 2023
1 parent 0d3c18f commit 39a2040
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-ravens-serve.md
@@ -0,0 +1,5 @@
---
'cssnano': major
---

feat!(cssnano): remove yaml config support
3 changes: 1 addition & 2 deletions packages/cssnano/package.json
Expand Up @@ -20,8 +20,7 @@
"license": "MIT",
"dependencies": {
"cssnano-preset-default": "workspace:^",
"lilconfig": "^2.0.3",
"yaml": "^1.10.2"
"lilconfig": "^2.1.0"
},
"homepage": "https://github.com/cssnano/cssnano",
"author": {
Expand Down
7 changes: 0 additions & 7 deletions packages/cssnano/src/index.js
Expand Up @@ -2,7 +2,6 @@
const path = require('path');
/** @type {any} */
const postcss = require('postcss');
const yaml = require('yaml');
const { lilconfigSync } = require('lilconfig');

const cssnano = 'cssnano';
Expand Down Expand Up @@ -101,15 +100,9 @@ function resolveConfig(options) {
'package.json',
'.cssnanorc',
'.cssnanorc.json',
'.cssnanorc.yaml',
'.cssnanorc.yml',
'.cssnanorc.js',
'cssnano.config.js',
],
loaders: {
'.yaml': (filepath, content) => yaml.parse(content),
'.yml': (filepath, content) => yaml.parse(content),
},
});
const config = configPath
? configExplorer.load(configPath)
Expand Down
9 changes: 1 addition & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39a2040

Please sign in to comment.