Please tell me how to extract common code from webpack4.

in webpack 4, CommonsChunkPlugin, was deleted and replaced by optimization.splitChunks
Baidu checked the introduction of splitChunks and tried for a long time to extract the public jq library. I would like to ask the bosses, can you provide a specific way to extract the public jq library from webpack 4? thank you

Mar.01,2021

module.exports = {
    entry: {
        task: path.join(__dirname, 'src', 'xxx', 'index.js')
    },
    optimization: {
        splitChunks: {
            cacheGroups: {
                vendor: {
                    test: /[\\/]node_modules[\\/]/,
                    name: 'common',
                    priority: 10,
                    chunks: 'all'
                }
            }
        }
    },
    output: {
        path: path.join(__dirname, 'public'),
        filename: 'bundle.[name].[hash:8].js'
    },
    ...
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e44e9e-430a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e44e9e-430a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?