Skip to content

Can't resolve SVGID after upgrading to 1.7 #9665

@JohannesRudolph

Description

@JohannesRudolph

Versions

λ  ng --version

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.7.0
Node: 6.12.3
OS: win32 x64
Angular: 5.2.4
... common, compiler, compiler-cli, core, forms, http
... platform-browser, platform-browser-dynamic, router

@angular/cli: 1.7.0
@angular-devkit/build-optimizer: 0.3.1
@angular-devkit/core: 0.3.1
@angular-devkit/schematics: 0.3.1
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.0
@schematics/angular: 0.3.1
@schematics/package-update: 0.3.1
typescript: 2.4.2
webpack: 3.11.0

Repro steps

Add a css class to styles.css that references a svg resource

Observed behavior

Build fails with lots of very similar errors (only the number after SVGID_ changes):

ERROR in ./src/styles.scss
(Emitted value instead of an instance of Error) CssSyntaxError: C:\dev\mc\meshfed\panel\src\styles.scss:5947:983: Can't resolve '%23SVGID_2_' in 'C:\dev\mc\meshfed\panel\src'

  5945 |
  5946 | #preloader {
> 5947 |   background-image: url("assets/core/texture.svg");
       |                                                    ^
  5948 |   background-repeat: no-repeat;
  5949 |   background-size: cover;

Desired behavior

No errors during builds

Mention any other details that might be useful (optional)

Build worked fine before on ng-cli v1.6.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions