The path set to "background" can not be resolved.

potato4d
168
potato4d
commented a year ago

Version

v2.0.0

Reproduction link

https://github.com/magitek-telescope/nuxt-v2-background-bug

Steps to reproduce

This bug is reproduction on Nuxt v2 only.

  1. clone [email protected]:magitek-telescope/nuxt-v2-background-bug.git
  2. yarn
  3. yarn dev

reproduction

on v1

Screen Shot 2018-09-22 at 21.58.17.png

on v2

Screen Shot 2018-09-22 at 22.01.26.png

What is expected ?

Images are displayed.

What is actually happening?

Images not displayed.

Additional comments?

On v2, path resolve is absoluted.
If change path resolve method from absolute to relative, I think that this problem will be solved.

bug
0
potato4d
168
potato4d
commented a year ago

Due to css-loader upgradation, use ~assets instead of ~/assets for alias in <url> CSS data type, e.g., background: url("~assets/banner.svg")

๐Ÿ™‡

0
Informations
Bug Report โ€ข Open
#c7799 - Created a year ago