How does webpack: configure sourceMap? for stylekeeper CSSS postcss (? autopre..)! less

when webpack is packaged, I use extract-text-webpack-plugin, but don"t know how to generate sourcemap, and blindly try some configurations that don"t work.

webpack.config.js

{
    test: /\.less$/,
    use: ExtractTextPlugin.extract({
        fallback: "style-loader",
        use: [
            {
                loader: "css-loader",
                options: {
                    sourceMap: true
                }
            },
            {
                loader: "postcss-loader",
                options: {
                    config: {
                        path: "./postcss.config.js"
                    },
                    sourceMap: true
                }
            },
            {
                loader: "less-loader",
                options: {
                    sourceMap: true
                }
            }
        ]
    })
}

postcss.config.js

module.exports = {
    plugins: {
        "autoprefixer": "last 5 version",
        // "postcss-px2rem": {}
    }
}
Mar.22,2021

missing a configuration

{
    devtool: 'sourcemap'
}
Menu