swashata / wp-webpack-script

💥🔥📦👩‍💻 An easy to use, pre configured, hackable webpack setup & development server for WordPress themes and plugins.
https://wpack.io
MIT License
408 stars 57 forks source link

Media Query Webpack plugin [help] #1185

Open marcof-git opened 3 years ago

marcof-git commented 3 years ago

Hi, i would like to include this plugin https://github.com/SassNinja/media-query-plugin in the workflow, but i don't understand how. Is any way to extend the webpack configuration like the example in the media-query-plugin repo:

rules: [
            {
                test: /\.scss$/,
                use: [
                    MiniCssExtractPlugin.loader,
                    'css-loader',
                    MediaQueryPlugin.loader,->>>
                    'postcss-loader',
                    'sass-loader'
                ]
            }
        ]
plugins: [
        new MediaQueryPlugin({
            include: [
                'example'
            ],
            queries: {
                'print, screen and (min-width: 75em)': 'desktop'
            }
        })
    ]