No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    assets alias return [object Module]

    Help
    2
    3
    79
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      Uneasy last edited by Uneasy

      I am having a problem to understand behaviour. I have 2 quasar apps, with same quasar config ( I am guessing there must be some differences). One is mine, and one is from someone else.
      In mine I use

      <img src="~assets/img/img.png" />
      

      and it works just fine.
      but in other app, it returns

      [object Module]
      

      so to make it work there I have to do

      <img :src="require('assets/img/img.png').default" />
      

      I was thinking it might be something do to with publicPath, but both config file don’t have that option changed.
      To complicate it more, second app works fine on someone else’s PC with normal aliases.
      Where is the difference coming from ?

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Please make sure you have @quasar/app v1.3.1. If not, please upgrade.

        Scott

        1 Reply Last reply Reply Quote 0
        • U
          Uneasy last edited by

          that was it. my previous app wasn’t updated for a while so it was 1.2.5 which it worked. new app was 1.3.0 and had that issue. After updating it to 1.3.1 everything is fine. Thanks

          1 Reply Last reply Reply Quote 0
          • First post
            Last post