Skip to content

Commit

Permalink
[Angular] Zoneless
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert committed Jan 9, 2025
1 parent 8dc3020 commit 4271c5c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions generators/angular/resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"ngx-infinite-scroll": "19.0.0",
"rxjs": "7.8.1",
"sockjs-client": "1.6.1",
"tslib": "2.8.1",
"zone.js": "0.15.0"
"tslib": "2.8.1"
},
"devDependencies": {
"@angular-architects/module-federation": "19.0.1",
Expand Down
3 changes: 1 addition & 2 deletions generators/angular/templates/angular.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@
"main": "<%= this.relativeDir(clientRootDir, clientSrcDir) %>main.ts",
"polyfills": [
<%_ if (communicationSpringWebsocket) { _%>
"./<%= this.relativeDir(clientRootDir, clientSrcDir) %>sockjs-client.polyfill",
"./<%= this.relativeDir(clientRootDir, clientSrcDir) %>sockjs-client.polyfill"
<%_ } _%>
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
Expand Down
3 changes: 1 addition & 2 deletions generators/angular/templates/angular.json.esbuild.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
"browser": "<%= this.relativeDir(clientRootDir, clientSrcDir) %>main.ts",
"polyfills": [
<%_ if (communicationSpringWebsocket) { _%>
"./<%= this.relativeDir(clientRootDir, clientSrcDir) %>sockjs-client.polyfill",
"./<%= this.relativeDir(clientRootDir, clientSrcDir) %>sockjs-client.polyfill"
<%_ } _%>
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
Expand Down
3 changes: 1 addition & 2 deletions generators/angular/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
"ngx-infinite-scroll": "<%= nodeDependencies['ngx-infinite-scroll'] %>",
"@popperjs/core": "<%= nodeDependencies['@popperjs/core'] %>",
"rxjs": "<%= nodeDependencies['rxjs'] %>",
"tslib": "<%= nodeDependencies['tslib'] %>",
"zone.js": "<%= nodeDependencies['zone.js'] %>"
"tslib": "<%= nodeDependencies['tslib'] %>"
},
"devDependencies": {
<%_ if (skipServer) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
import { ApplicationConfig, LOCALE_ID, importProvidersFrom, inject } from '@angular/core';
import { ApplicationConfig, LOCALE_ID, importProvidersFrom, inject, provideExperimentalZonelessChangeDetection } from '@angular/core';
import { BrowserModule, Title } from '@angular/platform-browser';
import { Router, RouterFeatures, TitleStrategy, provideRouter, withComponentInputBinding, withDebugTracing, withNavigationErrorHandler, NavigationError } from '@angular/router';
import { ServiceWorkerModule } from '@angular/service-worker';
Expand Down Expand Up @@ -59,6 +59,7 @@ export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes, ...routerFeatures),
importProvidersFrom(BrowserModule),
provideExperimentalZonelessChangeDetection(),
// Set this to true to enable service worker (PWA)
importProvidersFrom(ServiceWorkerModule.register('ngsw-worker.js', { enabled: false })),
<%_ if (enableTranslation) { _%>
Expand Down
6 changes: 2 additions & 4 deletions generators/app/__snapshots__/generator.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,7 @@ exports[`generator - app with default config should match snapshot 1`] = `
"webpack": "WEBPACK_VERSION",
"webpack-bundle-analyzer": "WEBPACK_BUNDLE_ANALYZER_VERSION",
"webpack-merge": "WEBPACK_MERGE_VERSION",
"webpack-notifier": "WEBPACK_NOTIFIER_VERSION",
"zone.js": "ZONE_JS_VERSION",
"webpack-notifier": "WEBPACK_NOTIFIER_VERSION"
},
"nodePackageManager": "npm",
"nodeVersion": "NODE_VERSION",
Expand Down Expand Up @@ -1386,8 +1385,7 @@ exports[`generator - app with gateway should match snapshot 1`] = `
"webpack": "WEBPACK_VERSION",
"webpack-bundle-analyzer": "WEBPACK_BUNDLE_ANALYZER_VERSION",
"webpack-merge": "WEBPACK_MERGE_VERSION",
"webpack-notifier": "WEBPACK_NOTIFIER_VERSION",
"zone.js": "ZONE_JS_VERSION",
"webpack-notifier": "WEBPACK_NOTIFIER_VERSION"
},
"nodePackageManager": "npm",
"nodeVersion": "NODE_VERSION",
Expand Down

0 comments on commit 4271c5c

Please sign in to comment.