Open udyux opened 2 years ago
After digging a bit, I can see that part of the issue is caused by styles.getPostCssConfig()
provided by "@ckeditor/ckeditor5-dev-utils"
returning an array of plugins. I set up a reducer to to convert to an object using the postcssPlugin
as keys, however issues persist.
"@ckeditor/ckeditor5-dev-utils"
is returning an array of objects that look like this example:
{
postcssPlugin: 'postcss-ckeditor5-theme-importer',
Once( root, { result } ) {
// Clone the options, don't alter the original options object.
const options = Object.assign( {}, pluginOptions, {
debug: pluginOptions.debug || false,
postCssOptions: {
plugins: [
require( 'postcss-import' )(),
require( './themelogger' )()
]
},
root, result
} );
return importThemeFile( options );
}
}
From what I can make out the plugins themselves are provided and should not be imported via require
as they do not exist in node_modules
.
This approach was functioning until @nuxt/postcss8
was added. I feel as though I'm approaching the limits of my understanding of the config generation. Any insight will be greatly appreciated.
We're trying to update CKEditor5 to v34 in our Nuxt apps. One of the major changes was a switch to PostCSS 8. Following the instructions for this package breaks our build in a peculiar way.
We had it working working with CKEditor5 v33 and PostCSS 7. Our current version of Nuxt is
2.15.8
.The only difference between our previous and current config is the addition of
@nuxt/postcss8
inbuildModules
. Here is the relevant part in our currentnuxt.config.ts
:The error output when we run
nuxt build
:If
"@nuxt/postcss8"
or the postcss configurationpostcss: styles.getPostCssConfig({
are removed the error disappears.The only changes to the dependancies are
@nuxt/postcss8
and the various CKEditor5 packages updated to latest. May be worth noting that the exact same error occurs with CKEditor5 v33 as soon as@nuxt/postcss8
is added.