Skip to content

Commit a71e92f

Browse files
alan-agius4mgechev
authored andcommitted
fix(@angular/cli): disable Browserslist old data warning
Set the `BROWSERSLIST_IGNORE_OLD_DATA` enviorment variable to disable Browserslist old data warning `Browserslist: caniuse-lite is outdated. Please run next command `npm update` See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
1 parent 6d274ed commit a71e92f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/angular/cli/lib/init.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ if (process.env['NG_CLI_PROFILING']) {
7676
}
7777

7878
(async () => {
79+
/**
80+
* Disable Browserslist old data warning as otherwise with every release we'd need to update this dependency
81+
* which is cumbersome considering we pin versions and the warning is not user actionable.
82+
* `Browserslist: caniuse-lite is outdated. Please run next command `npm update`
83+
* See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
84+
*/
85+
process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';
86+
7987
const disableVersionCheckEnv = process.env['NG_DISABLE_VERSION_CHECK'];
8088
/**
8189
* Disable CLI version mismatch checks and forces usage of the invoked CLI

0 commit comments

Comments
 (0)