assets alias return [object Module]

  • 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 ?

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


  • 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

Log in to reply