Skip to content

@ngtools/webpack - AOT build with file-loader outputPath turns img tag into string #7956

@ghost

Description

Bug Report

Versions.

Angular: 4.4.4
ngtools/webpack: 1.7.2,
file-loader: 1.1.5,
image-webpack-loader: 3.4.2,
webpack: 3.6.0,
webpack-dev-server: 2.9.1

Repro steps.

  1. Create a repo with image-loader and ngtools/webpack.
  2. Add a image-loader loader with "outputPath" as an option
  3. Create a reference to a image in the html.
  4. Create AOT build and run the output html.

The log given by the failure.

No error, just compiles like it should. Errors happens when running the app.
The app works when running a webpack-dev-server or webpack build. Only the prod build (this one has ngtools/webpack) has the problem. So the problem must be in the ngtools/webpack.

Desired functionality.

AOT build should compile just like a normal build should do, with the img tags not formatted to a string

Mention any other details that might be useful.

A repo that has the error: My webpack starter
Stackoverflow post: Stackoverflow post for the error

Workarround

There is actually a workaround, but a fix would be better. See my stackoverflow post for the workaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentneeds: more infoReporter must clarify the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions