angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Exception when importing scss from a library - esbuild

Open adsafawqew opened this issue 3 years ago • 2 comments

Command

serve

Is this a regression?

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

The previous version in which this bug was not present was

16.1.8

Description

library is created via https://angular.io/guide/creating-libraries

exception

  node_modules\LIBRARY\styles.scss 1:6  @import
  src\styles.scss 1:9                     root stylesheet [plugin angular-sass]

    angular:styles/global:styles:2:8:
      2 │ @import 'src/styles.scss';
        ╵         ~~~~~~~~~~~~~~~~~

LIBRARY/styles.scss

@use '@angular/material' as mat;
@import '@angular/material/theming';

@include mat-core();
...

PROJECT/styles.scss

@import '../node_modules/LIBRARY/styles';
...

with "builder": "@angular-devkit/build-angular:browser" works as expected with "builder": "@angular-devkit/build-angular:browser-esbuild" and version 16.1.8 works as expected

Minimal Reproduction

see description

Exception or Error

No response

Your Environment

Angular CLI: 16.2.0
Node: 18.17.1
Package Manager: npm 9.8.1
OS: win32 x64

Angular: 16.2.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-moment-adapter, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1602.0
@angular-devkit/build-angular   16.2.0
@angular-devkit/core            16.2.0
@angular-devkit/schematics      16.2.0
@angular/flex-layout            14.0.0-beta.41
@schematics/angular             16.2.0
rxjs                            7.8.1
typescript                      5.1.6
zone.js                         0.13.1

Anything else relevant?

No response

adsafawqew avatar Aug 10 '23 05:08 adsafawqew

duplicate #25660

adsafawqew avatar Aug 10 '23 08:08 adsafawqew

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.