From fcd598286a527e19f9310e19ca02ad078f1805db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 3 May 2026 01:34:14 +0200 Subject: [PATCH] Fixed webpack build --- assets/controllers/elements/ckeditor_controller.js | 2 +- webpack.config.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/controllers/elements/ckeditor_controller.js b/assets/controllers/elements/ckeditor_controller.js index b7c87dab..17aa9214 100644 --- a/assets/controllers/elements/ckeditor_controller.js +++ b/assets/controllers/elements/ckeditor_controller.js @@ -29,7 +29,7 @@ import "ckeditor5/ckeditor5.css";; import "../../css/components/ckeditor.css"; const translationContext = require.context( - 'ckeditor5/translations', + 'ckeditor5-translations', //Alias defined in webpack.config.js false, //Only load the translation files we will really need /(de|it|fr|ru|ja|cs|da|zh|pl|hu)\.js$/ diff --git a/webpack.config.js b/webpack.config.js index 18893d8b..60ea145f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -22,6 +22,7 @@ var Encore = require('@symfony/webpack-encore'); const zlib = require('zlib'); +const path = require('path') const CompressionPlugin = require("compression-webpack-plugin"); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; @@ -133,6 +134,10 @@ Encore loader.exclude = /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/; } ) + .addAliases({ + 'ckeditor5-translations': path.resolve(__dirname, 'node_modules/ckeditor5/dist/translations') + }) + ;