Skip to content

CSS images with relative path not included in production build #4806

Description

@arntj

Please provide us with the following information:

OS?

Windows 10

Versions.

1.0.0-beta.32.3

Repro steps.

  1. Create new app with ng new.
  2. Add an image anywhere outside the app directory, e.g. in the assets directory.
  3. Reference this image from the app.component.css, using a relative path.
    Example: background-image: url(../assets/some_image.png)
  4. Do the following: ng build --prod.
  5. Verify that the image is not copied along with the CSS in the build output, meaning the image reference is now broken.

The log given by the failure.

N/A

Mention any other details that might be useful.

The image is correctly copied if doing ng build without the --prod switch.


Thanks! We'll be in touch soon.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions