Skip to content

vite optimized change causing reloads #25455

@NatanCoralogix

Description

@NatanCoralogix

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

16.0.3

Description

After upgrading to 16.1.1
while running my app, going from page to page suddenly esbuild is reloading:

2:16:03 PM [vite] ✨ new dependencies optimized: @angular/cdk/layout, highcharts/modules/solid-gauge, rxjs/internal-compatibility, nanoid
2:16:03 PM [vite] ✨ optimized dependencies changed. reloading

on some pages, it causes reloading due to this optimization.
how can i tell vite to disable it? i dont want those reloads while im working

Minimal Reproduction

ng serve
working with the app, going from page to page

Exception or Error

No response

Your Environment

Angular CLI: 16.1.1
Node: 16.16.0
Package Manager: npm 8.11.0
OS: darwin arm64

Angular: 16.1.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1601.1
@angular-devkit/build-angular      16.1.1
@angular-devkit/core               16.1.1
@angular-devkit/schematics         16.1.1
@angular/cdk                       16.0.1
@angular/cli                       16.1.1
@angular/flex-layout               14.0.0-beta.40
@angular/material                  15.2.9
@angular/material-moment-adapter   15.2.9
@schematics/angular                16.1.1
rxjs                               6.6.7
typescript                         4.9.5

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions