Aedvald Tseh's answer did help me so thanks for that. However, I found that the following finer-grained configuration also corrects this error but allows for some of the production optimization:
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
For info see the Angular documentation: Angular doc on optimization