You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not 100% clear to me how I am supposed to provide our custom Cssnano preset to the CssMinimizer, as it seems there's some evaluation of options that prevent imports/requires in our preset. Do you have an example to share?
I believe that it is a similar issue that @RDIL already reported here: #58
The text was updated successfully, but these errors were encountered:
But maybe just documenting this better or throwing a user-friendly error could be good enough?
Yep, here problems with multi threading, we need serialize options and require is broken in this case, so we should use string here (i.e. require.resolve)
Expected Behavior
Using cssnano preset with a require call instead of a string preset + options object:
Actual Behavior
Also tried with
preset: require('cssnano-preset-advanced')(opts)
(looks like the correct way to me) and got another similar error:Code
cf above
How Do We Reproduce?
cf above
For context, Docusaurus is migrating to Webpack 5 (@alexander-akait helped review a bit our PR facebook/docusaurus#4089)
We have a custom CSSNano preset with some custom config + an additional postcss plugin: https://github.com/facebook/docusaurus/tree/master/packages/docusaurus-cssnano-preset
It's not 100% clear to me how I am supposed to provide our custom Cssnano preset to the CssMinimizer, as it seems there's some evaluation of options that prevent imports/requires in our preset. Do you have an example to share?
I believe that it is a similar issue that @RDIL already reported here: #58
The text was updated successfully, but these errors were encountered: