CKEditor Webpack config errors

I’m trying to create webpack config for CKEditor 5. I’m trying to create custom build.
Here is my webpack.mix.js

const mix = require('laravel-mix');
require('laravel-mix-purgecss');


const { styles } = require( '@ckeditor/ckeditor5-dev-utils' );

const webpack = require('webpack');
/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel applications. By default, we are compiling the CSS
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/js/app.js', 'public/js').vue()
        .postCss('resources/css/app.css', 'public/css', [
        require('postcss-import'),
        require('tailwindcss'),
        require('autoprefixer'),
        ])
    .webpackConfig(require('./webpack.config'));
const CKEditorWebpackPlugin = require('@ckeditor/ckeditor5-dev-webpack-plugin')
const CKEStyles = require('@ckeditor/ckeditor5-dev-utils').styles
const CKERegex = {
    svg: /ckeditor5-[^/\]+[/\]theme[/\]icons[/\][^/\]+.svg$/,
    css: /ckeditor5-[^/\]+[/\]theme[/\].+.css/
}

Mix.listen('configReady', webpackConfig => {
    const rules = webpackConfig.module.rules
    const targetSVG = /(.(png|jpe?g|gif|webp)$|^((?!font).)*.svg$)/
    const targetCSS = /.css$/

    // exclude CKE regex from mix's default rules
    // if there's a better way to loop/change this, open to suggestions
    for (const rule of rules) {
        if (rule.test.toString() === targetSVG.toString()) {
            rule.exclude = CKERegex.svg
        } else if (rule.test.toString() === targetCSS.toString()) {
            rule.exclude = CKERegex.css
        }
    }
});

mix.webpackConfig({
    module: {
        rules: [
            {
                test: /ckeditor5-[^/\]+[/\]theme[/\]icons[/\][^/\]+.svg$/,

                use: [ 'raw-loader' ]
            },
            {
                test: /ckeditor5-[^/\]+[/\]theme[/\].+.scss$/,

                use: [
                    {
                        loader: 'style-loader',
                        options: {
                            injectType: 'singletonStyleTag',
                            attributes: {
                                'data-cke': true
                            }
                        }
                    },
                    'css-loader',
                    {
                        loader: 'postcss-loader',
                        options: {
                            postcssOptions: styles.getPostCssConfig( {
                                themeImporter: {
                                    themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' )
                                },
                                minify: true
                            } )
                        }
                    }
                ]
            }
        ]
    },
    }
);

But after all I get only

CKEditorError: svg is null
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-svg is null

XML parsing error: incorrect
Line 1, character 1:

I’m trying to add custom CkEditor 5 build for my vue js|Laravel application