fredemagi
336
3
Mix

Transpile CKEditor to ES5 using Webpack/Laravel mix

Posted 2 months ago by fredemagi

In order to get CKEditor to work on previous versions of Safari in iOS 10, I was recommended to transpile CKEditor to ES5 using their guide: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/advanced-setup.html#option-building-to-es5-target

However, when I need to add

module: {
    rules: [
        {
            test: /ckeditor5-[^\/\]+[\/\].*\.js$/,
            use: [
                {
                    loader: 'babel-loader',
                    options: {
                        presets: [ require( '@babel/preset-env' ) ]
                    }
                }
            ]
        },
        ...
    ]
}

to webpack.mix.js, I'm not sure about the syntax. The same goes for

entry: [
    require.resolve( 'regenerator-runtime/runtime.js' )
]

Any help is appreciated.

Please sign in or create an account to participate in this conversation.