Skip to content

Commit 942b14b

Browse files
committed
feat: default zoneless polyfill setup
1 parent d69e5fa commit 942b14b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

apps/nativescript-demo-ng/src/polyfills.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import '@nativescript/angular/polyfills';
1111
* Zone.js and patches
1212
*/
1313
// Add pre-zone.js patches needed for the NativeScript platform
14-
import '@nativescript/zone-js/dist/pre-zone-polyfills';
14+
// import '@nativescript/zone-js/dist/pre-zone-polyfills';
1515

16-
// Zone JS is required by default for Angular itself
17-
import 'zone.js';
16+
// // Zone JS is required by default for Angular itself
17+
// import 'zone.js';
1818

19-
// Add NativeScript specific Zone JS patches
20-
import '@nativescript/zone-js';
19+
// // Add NativeScript specific Zone JS patches
20+
// import '@nativescript/zone-js';

packages/angular/polyfills/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ const polyfilledPerformance = getPerformanceObject();
3030
for (const key in polyfilledPerformance) {
3131
global.performance[key] ??= polyfilledPerformance[key];
3232
}
33+
34+
global.queueMicrotask ??= (fn: () => unknown) => Promise.resolve().then(fn);

0 commit comments

Comments
 (0)