Last active
January 14, 2023 19:21
-
-
Save jojojojojoj5564656465465/56547a2b7ebc086fd6c93d639b7ee618 to your computer and use it in GitHub Desktop.
configuration pour postcss astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mode = process.env.NODE_ENV; | |
const dev = mode === "development"; | |
const postcssMediaRanges = require("postcss-media-minmax"); | |
const postcssImport = require("postcss-import"); | |
// const OpenProps = require('open-props') | |
const cssnano = require("cssnano"); | |
module.exports = { | |
plugins: [ | |
postcssImport({ path: ["src"] }), | |
postcssMediaRanges(), | |
require("stylelint")({ | |
plugins: ["stylelint-prettier"], | |
rules: { | |
"prettier/prettier": [true, { singleQuote: true, tabWidth: 4 }], | |
}, | |
extends: ["stylelint-prettier/recommended"], | |
}), | |
//require('postcss-font-magician')({ | |
//formats: 'woff2 woff', | |
//}), | |
require("postcss-each")({}), | |
require("postcss-mixins")({}), | |
require("postcss-preset-env")({ | |
features: { | |
"nesting-rules": true, | |
}, | |
stage: 0, | |
autoprefixer: { | |
//https://github.com/postcss/autoprefixer#options | |
cascade: false, | |
grid: false, | |
grid: "autoplace", | |
}, | |
browsers: "last 2 versions", | |
}), | |
//require('cssnano')({}), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment