Skip to content

data uri image is broken in AOT mode using @ngtools/webpack #8378

@gitawego

Description

@gitawego

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

ngtools/webpack @1.8.0
angular 5

Repro steps.

use styleUrls to include a scss file, and in this file, reference to an image like this

.logo {
  background: url('./logo.png') #fff no-repeat;
  
}

in webpack, configure url-loader for scss, and put parameter limit bigger than logo file size in order to convert logo to data uri format.

start up webpack build in AOT mode, the logo in data uri format is broken, in fact, even using file-loader, the image is broken as well.

The log given by the failure.

Desired functionality.

in angular 4, the image works normally.

Mention any other details that might be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulseverity3: broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions