This demo repo uses PostCSS and tailwindcss. When trying to use module mounts for a node_module folder (or file) the build fails due to a PostCSS issue:
error calling postCSS: no Resource provided in transformation
The site builds fine if one of these is changed:
Stop using module mounts
Stop using PostCSS
I was able to use them together in a SCSS based Hugo site with PostCSS as specified in the Docs. Is there any chance using module mount changes how PostCSS sees node_modules for importing purposes?
Any idea why this usage of Hugo’s PostCSS fails when using module mounts?
When the mounts config was introduced in Hugo 0.56.0, we were careful to preserve the existing staticDir and similar configuration to make sure all existing sites just continued to work.
But you should not have both. So if you add a mounts section you should make it complete and remove the old staticDir etc. settings.