From b3e588801da324d84eb683eab4149274d58338e2 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 5 Nov 2021 08:59:46 +0100 Subject: [PATCH] fix(@angular-devkit/build-angular): suppress "@charset" must be the first rule in the file warning esbuild will issue a warning when `@charset` is in the middle of the file. This is caused by css-loader will concats the file and doesn't hoist `@charset`, (https://github.com/webpack-contrib/css-loader/issues/1212). While, esbuild will issue a warning regarding the above, it will hoist to the very top. In many cases, this warning is not actionable by the users as the `@charset` would be likely specified in 3rd party libs. Closes #22097 --- .../angular_devkit/build_angular/src/webpack/configs/common.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts index e5e70a208fa3..64c599ccbd55 100644 --- a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts +++ b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts @@ -353,6 +353,9 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise