Build error when including npm module @ckeditor/ckeditor5-basic-styles@41.0.0 and others

I’m trying to include the npm module @ckeditor/ckeditor5-basic-styles@41.0.0 as a plugin for @ckeditor/ckeditor5-react. The basic editor works ok but this and other plugins cause a build error when I “require” them.

Any help appreciated TIA

[:app] Compiling …
Failed to inspect file
node_modules@ckeditor\ckeditor5-basic-styles\node_modules@ckeditor\ckeditor5-engine\theme\placeholder.css
Errors encountered while trying to parse file
node_modules@ckeditor\ckeditor5-basic-styles\node_modules@ckeditor\ckeditor5-engine\theme\placeholder.css
{:line 7, :column 1, :message “primary expression expected”}

placeholder.css:

/*

  • Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
  • For licensing, see LICENSE.md or CKEditor OSS License
    */

/* See ckeditor/ckeditor5#936. */
.ck.ck-placeholder,
.ck .ck-placeholder {
position: relative;

&::before {
position: absolute;
left: 0;
right: 0;
content: attr(data-placeholder);

  /* See ckeditor/ckeditor5#469. */
  pointer-events: none;

}
}

shadow-cljs does not support CSS. Thefore you cannot require CSS files directly and need a secondary tool for that.

If the plugin requires those CSS files you can setup webpack and follow these directions. Then shadow-cljs will only be processing the CLJS files and JS/CSS is left to webpack.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.