SE7ENSKY / group-css-media-queries

CSS postprocessing: group media queries. Useful for postprocessing preprocessed CSS files.
MIT License
101 stars 20 forks source link

Using group-css-media-queries with webpack Encore for Symfony 4 projects ? #23

Open khoudj opened 4 years ago

khoudj commented 4 years ago

Is there a way to use group-css-media-queries with webpack Encore for Symfony 4 projects ?

In Webpack Encore configuration, there is a method .enablePostCssLoader(). This method accept a postCssLoaderOptionsCallback as signature. I think we can plug group-css-media-queries here but i not sure who to do that, any idea

kravchukmg commented 1 year ago

I faced the same problem.

WebLifeOn commented 1 year ago

you can add postcss-combine-media-query => yarn postcss-combine-media-query

.enablePostCssLoader() in webpack.config.js

postcss.config.js file

module.exports = {
  plugins: {
    'autoprefixer': {},
    'postcss-combine-media-query': {}
  }
};