Closed
Description
Command
build, 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
Webpack Builder
Description
When using new ESBuild based builder cannot find source of warning in console
ESBuild output
For component styles
[WARNING] <warning text> [plugin angular-sass]
For global styles
[WARNING] <warning text> [plugin angular-sass]
angular:styles/global:styles:1:8:
1 │ @import 'src/styles.scss';
╵ ~~~~~~~~~~~~~~~~~
Webpack output
For component styles
./src/.../some.component.scss?ngResource - Warning: Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
<warning text>
<source file path> <line>:<pos> context function()
... <all stack>
src/.../some.component.scss <line>:<pos> root stylesheet
For global styles
./src/styles.scss - Warning: Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
<warning text>
<source file path> <line>:<pos> context function()
... <all stack>
src/styles.scss <line>:<pos> root stylesheet
Minimal Reproduction
Any project with specified build system
place anywhere in component stylesheet file or imported file into global stylesheet
@warn 'some message';
Build
Exception or Error
No response
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 17.3.7
Node: 20.13.1
Package Manager: npm 10.8.0
OS: win32 x64
Angular: 17.3.9
... animations, cdk, common, core, elements, forms, localize
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1703.7
@angular-devkit/build-angular 17.3.7
@angular-devkit/core 17.3.7
@angular-devkit/schematics 17.3.7
@angular/cli 17.3.7
@angular/pwa 17.3.7
@schematics/angular 17.3.7
rxjs 7.8.1
typescript 5.4.5
webpack 5.91.0
zone.js 0.14.5
Anything else relevant?
No response