0

I have a qiute a lot of images that are shared across Angular components/pages, so I've created an images folder inside the wwwroot folder.

But whenever I try to reference an image from any.component.html I get the following error:

Prerendering failed because of error: Error: Cannot find module "../build/images/logo/logo-light.png"

enter image description here

I tried to change the path from ../build to build, ~/build etc. But that doesn't do the trick.

How can I solve this issue?

w00
  • 26,172
  • 30
  • 101
  • 147
  • Perhaps its a double-quotes vs single-quotes issue. That error message looks awfully familiar... – Iskandar Reza Sep 19 '17 at 00:22
  • Could you try /build or /build/images or /images or images? – Vega Sep 19 '17 at 08:27
  • Possible duplicate of [Set Image path on ASP.NET Core + Angular 2 template for Visual Studio](https://stackoverflow.com/questions/41426787/set-image-path-on-asp-net-core-angular-2-template-for-visual-studio) – jaycer Oct 10 '17 at 17:16

0 Answers0