2023-03-22 04:44:47 +03:00
|
|
|
const { version } = require("./package.json");
|
|
|
|
|
2017-11-16 01:14:48 +03:00
|
|
|
let plugins = [
|
2023-03-22 04:44:47 +03:00
|
|
|
require("postcss-banner")({
|
|
|
|
banner: `chota.css v${version} | MIT License | https://github.com/jenil/chota`,
|
|
|
|
important: true,
|
|
|
|
}),
|
2023-03-21 06:57:54 +03:00
|
|
|
require("postcss-import")({
|
|
|
|
plugins: [require("stylelint")({ fix: true, formatter: "compact" })],
|
|
|
|
}),
|
|
|
|
require("autoprefixer")(),
|
|
|
|
require("postcss-reporter")({ clearReportedMessages: true }),
|
2017-11-16 01:14:48 +03:00
|
|
|
];
|
|
|
|
|
2018-07-30 00:45:05 +03:00
|
|
|
// if (process.env.NODE_ENV == 'production') plugins.push(require("postcss-csso"))
|
|
|
|
if (process.env.NODE_ENV == "production")
|
|
|
|
plugins.push(
|
|
|
|
require("cssnano")({
|
2023-03-21 06:57:54 +03:00
|
|
|
preset: "default",
|
2018-07-30 00:45:05 +03:00
|
|
|
})
|
|
|
|
);
|
2017-11-16 01:14:48 +03:00
|
|
|
|
|
|
|
module.exports = {
|
2023-03-21 06:57:54 +03:00
|
|
|
plugins,
|
2018-07-30 00:45:05 +03:00
|
|
|
};
|