You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is the styles task from my gulpfile.js. My project has multiple css files which gets outputted in the assets folder. When the task is executed, I don't know why this plugin merges all the media queries from each file and outputs it to each file.
constpostcss=require("gulp-postcss");constpostcssPresetEnv=require("postcss-preset-env");constcssnano=require("cssnano");constpurgecss=require("gulp-purgecss");constpurgecssWordpress=require('purgecss-with-wordpress');constpostcssNormalize=require("postcss-normalize");constatImport=require("postcss-easy-import");constcombineMediaQueries=require("postcss-combine-media-query");functionstyles(){constsourcemaps=require("gulp-sourcemaps");constpostcssProcessors=[atImport({root: "./src/css",path: "./src/css"}),postcssNormalize({browsers: ["defaults","IE >= 10"]}),require("postcss-nested")(),postcssPresetEnv({stage: 0,preserve: false,browsers: ["defaults","IE >= 10"],autoprefixer: isProduction,features: {"nesting-rules": false},fontFace: true,}),combineMediaQueries()];if(isProduction){postcssProcessors.push(cssnano(),);}returnsrc(["src/css/**/!(_)*.css",// select all css files"!src/css/**/_*/",// exclude all folder starting with _"!src/css/**/_*/**/*"//exclude files/subfolders in folders starting with '_']).pipe(gulpIf(!isProduction,sourcemaps.init())).pipe(postcss(postcssProcessors,{parser: require("postcss-comment")// To handle inline comments})).pipe(gulpIf(!isProduction,sourcemaps.write("."))).pipe(dest("assets/css")).pipe(gulpIf(!isProduction,browserSync.stream()));}
The text was updated successfully, but these errors were encountered:
Below is the
styles
task from my gulpfile.js. My project has multiple css files which gets outputted in theassets
folder. When the task is executed, I don't know why this plugin merges all the media queries from each file and outputs it to each file.The text was updated successfully, but these errors were encountered: