Ich gebe postCSS eine pure Neugier, aber ich habe eine Kompilierzeit um ~ 2sec bereits.Grunt PostCSS Kompilation sehr langsam
Ich verwende nur 3 Plugins: autoprefixer
, postcss-import
und postcss-nested
Ich habe app.css
bekam das 2-Dateien importiert:
@import "_base/_base.css";
@import "_common/_common.css";
dann habe ich _base.css
:
.title {
display: flex;
color: white;
}
und _common.css
:
header {
background: red;
h1 {
background: black;
}
}
Mein Beobachter nur zuschaut /postCSS
:
...
watch: {
postcss: {
files: grunt.settings.devDir + 'postCSS/{,**/}*.css',
tasks: ['postcss:dev']
}
},
...
postcss: dev Aufgabe:
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/'
}]
},
Also meine Frage ist, wie kann ich schon 2 Sekunden erhalten, um 3 kleine CSS-Dateien zusammenstellen? Fehle ich etwas?
Danke!