Replace Angular 16 polyfill

267 Views Asked by At

I am attempting to get a simple Angular 16 project created with the angular-cli to run in sciter--which uses QuickJS. I have currently identified two changes that need to be made to the generated Angular polyfill.js--it seems these changes cannot live outside this file.

I have found that commenting out the "polyfills" key within angular.json prevents the creation of the dist/polyfill.js. I then imported my polyfills.js within main.ts. The problem now is Chrome complains about:

main.ts:8 Error: NG0908: In this configuration Angular requires Zone.js

I have confirmed my polyfill file is the same as the generated version. I also tried variations of using the scripts section of the angular.json as well as importing inside the index.html header section. Nothing seems to work.

I have found that if I use this same approach with an Angular 16 project that does not contain any router code it seems to work just fine. For some reason the addition of the router code inside my project is causing problems.

What could I be missing? Any advice would be much appreciated.

0

There are 0 best solutions below