aboutsummaryrefslogtreecommitdiff
path: root/postcss.config.js
blob: d5ff5a25998822bb903500ae29d7e42e0d500a41 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module.exports = (ctx) => {
    const production = ctx.env === 'production';
    const config = {
        map: production ? false : ctx.options.map,
        plugins: {
            'autoprefixer': { grid: true },
            'stylelint': production ? false : {},
            'postcss-import': {},
            'postcss-preset-env': { stage: 0 },
            'cssnano': production ? { preset: 'default' } : false,
            'postcss-url' : { url: 'copy', assetsPath: '', useHash: true }
        },
    };
    return config;
};