Answer the question
In order to leave comments, you need to log in
How to add postcss.config.js to laravel.mix?
No matter how I tried, but the plugins are not picked up in any way
I tried to add the .postCss method, nothing
I tried to give the path to the config did not help either
mix.sourceMaps('source-map').react('resources/assets/js/app.js', 'public/js')
.webpackConfig({
module: {
rules: [
{
test: /\.css$/,
loaders: [
{ loader: 'style-loader' },
{ loader: 'css-loader', options: { modules: true, importLoaders: 1, localIdentName: '[folder]_[name]__[local]--[hash:base64:5]' } },
{ loader: 'postcss-loader',
options: {
plugins: () => {
postcssPresetEnv({
stage: 3,
features: {
'browsers': browsers,
'nesting-rules': true,
}
})
}
}
}
]
}
],
}
})
Answer the question
In order to leave comments, you need to log in
It is possible that it is no longer relevant, but I found this thing for myself: https://laravel-mix.com/extensions/postcss-config
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question