Problem with SRC attribute in some components (in Nuxt).


Topic: Problem with SRC attribute in some components (in Nuxt).

xdon82 asked 4 years ago

Improper path after compilation. For normal html tags like <img /> it works ok . After compilation (dev) I see an image with beginning of src like this "http://localhost:3000/_nuxt/assets/images/"

but when i try use <mdb-view> the image cannot be shown because after compilation (dev) I see improper path, I see this "http://localhost:3000/assets/images/" That means something is wrong

I wonder about renew my pro license, but I see so many unresolved issues for years, that I'm not sure. I just use it now for learning purposes and i'm checking if it's worth to use in other project...

Is any fast workaround? any additional configuration for nuxt it may make it workingPlease...


xdon82 answered 4 years ago

SOLVED: I forgot in Nuxt , assets\images can be accessed using require();

But you could easily code that to not use require() and you could mention that in your manual

Still a component can be more nuxt/ user friendly


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.2
  • Device: Laptop PC
  • Browser: Chrome Edge
  • OS: Win10
  • Provided sample code: No
  • Provided link: No