Skip to content

Instantly share code, notes, and snippets.

@jojojojojoj5564656465465
Last active January 14, 2023 19:21
Show Gist options
  • Save jojojojojoj5564656465465/56547a2b7ebc086fd6c93d639b7ee618 to your computer and use it in GitHub Desktop.
Save jojojojojoj5564656465465/56547a2b7ebc086fd6c93d639b7ee618 to your computer and use it in GitHub Desktop.
configuration pour postcss astro
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