Date: 2021-08-07 20:00:31, Hit: 368

In laravel-mix setting antd less build config

npm install antd npm install --save-dev css-loader less less-loader style-loader

webpack.mix.js

mix.js('resources/js/app.js', 'public/js')
    .react().extract(['react'])
    .sass('resources/sass/app.scss', 'public/css')
    .webpackConfig({
        module: {
            rules: [
                {
                    test: /\.less$/,
                    loader: 'less-loader',
                    options: {
                        lessOptions: {
                            modifyVars: {
                                        'primary-color': '#1DA57A',
                                        'link-color': '#1DA57A',
                                        'border-radius-base': '2px'
                            },
                            javascriptEnabled: true
                        }
                    }
                },
            ]
        }
    })
    .sourceMaps();
Edit Delete
License by Moony