Skip to content

Files not declared in angular.cli/assets and referenced in templates are not being fingerprinted and copied to root (dist) after compilation #8139

Closed
@IagoBarboza

Description

@IagoBarboza

Bug Report or Feature Request (mark with an x)

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

Versions.

@angular/cli: 1.4.4
node: 6.11.1
os: darwin x64
@angular/animations: 4.2.6
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.2.6
@angular/compiler: 4.2.6
@angular/compiler-cli: 4.2.6
@angular/core: 4.2.6
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.2.6
@angular/http: 4.2.6
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.2.6
@angular/platform-browser-dynamic: 4.2.6
@angular/platform-server: 4.2.6
@angular/router: 4.2.6
@angular/cli: 1.4.4
typescript: 2.3.4
macOS X Yosemite

Repro steps.

  • Create a component and put any image (i.e. image.png) file in the root directory of the component
  • In the template, add the tag
  • Do not declare the file in angular.cli/assets array
  • Run ng serve or ng build

The log given by the failure.

  • The image.png is not in the root (dist)

Desired functionality.

Images and other files inside a module or component, if referenced in srcs of tag elements inside templates, should be copied to root (dist) and fingerprinted as in CSS files.

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