aboutsummaryrefslogtreecommitdiff
path: root/webpack.common.js
diff options
context:
space:
mode:
authorMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2025-03-07 07:46:47 +0000
committerMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2025-03-07 07:46:47 +0000
commit9c14efde272b81d8f5bea55d882bb50766321c26 (patch)
treeb738bef3fd6e8c9369bb3bbd7ab9e45964554e4e /webpack.common.js
parent076171cd0b7c190859fabfb1d85036465ef9a3e0 (diff)
Silence webpack warnings about postcss-nesting and @nest.
Closes #5354 Merge request studip/studip!4024
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js24
1 files changed, 16 insertions, 8 deletions
diff --git a/webpack.common.js b/webpack.common.js
index c18818d..91ead2a 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -6,6 +6,21 @@ const { CKEditorTranslationsPlugin } = require( '@ckeditor/ckeditor5-dev-transla
const { styles } = require('@ckeditor/ckeditor5-dev-utils');
+const postcssOptions = styles.getPostCssConfig({
+ themeImporter: {
+ themePath: require.resolve('@ckeditor/ckeditor5-theme-lark')
+ },
+ minify: true
+});
+
+// TODO: Dieser Workaround sollte entfernt werden, sobald wir den CKE auf v43+ updaten können.
+postcssOptions.plugins[postcssOptions.plugins.findIndex((plugin) => plugin.postcssPlugin === 'postcss-nesting')] = require('postcss-nesting')({
+ // https://github.com/ckeditor/ckeditor5/issues/11730
+ noIsPseudoSelector: true,
+ edition: '2021',
+ silenceAtNestWarning: true
+});
+
const assetsPath = path.resolve(__dirname, "resources/assets/javascripts");
module.exports = {
@@ -43,14 +58,7 @@ module.exports = {
},
{
loader: "postcss-loader",
- options: {
- postcssOptions: styles.getPostCssConfig( {
- themeImporter: {
- themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' )
- },
- minify: true
- } )
- }
+ options: { postcssOptions }
}
]
},