Currently, when no cloudinary.bucketName is defined the build fails in production. This is a good thing because it prevents deploying a version with images not working, but we only catch it when deploying, often resulting in a few more commits to fix it.
What we should have instead is cloudinary.enabled (default to true).
If isDev and isEnabled and !bucketName => Display a warning message
If isProd and isEnabled and !bucketName => Fail the build
Currently the build only fails at the HTML building stage; we should be able to fail way earlier than that
Currently, when no
cloudinary.bucketName
is defined the build fails in production. This is a good thing because it prevents deploying a version with images not working, but we only catch it when deploying, often resulting in a few more commits to fix it.What we should have instead is
cloudinary.enabled
(default to true).isDev
andisEnabled
and!bucketName
=> Display a warning messageisProd
andisEnabled
and!bucketName
=> Fail the buildCurrently the build only fails at the HTML building stage; we should be able to fail way earlier than that