0
私はpostCSSに純粋な好奇心を与えていますが、すでに約2秒のコンパイル時間があります。Grunt PostCSSのコンパイルが非常に遅い
私は唯一の3つのプラグイン使用しています:私は2つのファイルをインポートapp.css
を持っているautoprefixer
、postcss-import
とpostcss-nested
を:
@import "_base/_base.css";
@import "_common/_common.css";
、私は_base.css
を持っている:
.title {
display: flex;
color: white;
}
および_common.css
:
header {
background: red;
h1 {
background: black;
}
}
私のウォッチャーは/postCSS
を見ている:
...
watch: {
postcss: {
files: grunt.settings.devDir + 'postCSS/{,**/}*.css',
tasks: ['postcss:dev']
}
},
...
postcss:DEVタスク:
dev: {
options: {
map: false,
processors: [
require('autoprefixer')({browsers: 'last 1 versions'}),
require('postcss-import')(),
require('postcss-nested')()
]
},
files: [{
expand: true,
cwd: grunt.settings.devDir + 'postCSS/',
src: ['app.css'],
dest: grunt.settings.devDir + 'css/'
}]
},
は、だから私の質問は、私はすでに3つの小さなcssファイルをコンパイルする2秒を取得する方法、ありますか?何か不足していますか?
ありがとうございます!