From f3d06102676e5cb88b6b49e3d07d20447679fa02 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Wed, 25 Jan 2023 18:49:04 +0100 Subject: [PATCH] Move PostCSS config to package.json --- .eslintrc.json | 8 +------- package.json | 13 ++++++++++++- postcss.config.cjs | 11 ----------- 3 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 postcss.config.cjs diff --git a/.eslintrc.json b/.eslintrc.json index 17c625a..2246e30 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,17 +10,11 @@ }, "overrides": [ { - "files": ["postcss.config.js", "vite.config.js"], + "files": ["vite.config.js"], "env": { "node": true, "browser": false } - }, - { - "files": ["postcss.config.js"], - "rules": { - "unicorn/prefer-module": 0 - } } ] } diff --git a/package.json b/package.json index 4a53475..acffad7 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,14 @@ "size-limit": "^8.1.0", "vite": "^4.0.4" }, + "postcss": { + "plugins": { + "postcss-css-variables": {}, + "postcss-calc": {}, + "autoprefixer": {}, + "postcss-csso": {} + } + }, "size-limit": [ { "limit": "7 KB", @@ -81,6 +89,9 @@ }, "clean-publish": { "withoutPublish": true, - "tempDir": "package" + "tempDir": "package", + "fields": [ + "postcss" + ] } } diff --git a/postcss.config.cjs b/postcss.config.cjs deleted file mode 100644 index 236ebe7..0000000 --- a/postcss.config.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - map: { - inline: false, - }, - plugins: [ - require("postcss-css-variables"), - require("postcss-calc"), - require("autoprefixer"), - require("postcss-csso"), - ], -};