vue-loader icon indicating copy to clipboard operation
vue-loader copied to clipboard

Unable to compile if component template has img element with src attribute value "..."

Open MRVDH opened this issue 4 years ago • 3 comments

Version

15.9.3

Reproduction link

https://jsfiddle.net/chrisvfritz/50wL7mdz/ (don't know how to make a jsfiddle that uses vue-loader)

Steps to reproduce

import a component that has an img element with src attribute value "..." in the template. Example:

<template>
    <div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
        <div class="toast-header">
            <img src="..." class="rounded mr-2" alt="...">
        </div>
    </div>
</template>

What is expected?

Should compile

What is actually happening?

ERROR Failed to compile with 1 errors
This dependency was not found:

  • ... in ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"34501d4a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/NotificationsComponent.vue?vue&type=template&id=a13abeb6&scoped=true&

To install it, you can run: npm install --save ...

MRVDH avatar Aug 28 '20 19:08 MRVDH

@sodatea Out of curiosity, why is this not marked as a bug?

MRVDH avatar Aug 30 '20 08:08 MRVDH

Because an error is expected to be thrown here. But the error message can be improved.

haoqunjiang avatar Aug 31 '20 01:08 haoqunjiang

Any update on this one?

cioccarellia avatar Mar 18 '21 13:03 cioccarellia