vuejs / vue-loader

📦 Webpack loader for Vue.js components
MIT License
4.99k stars 915 forks source link

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

Open MRVDH opened 4 years ago

MRVDH commented 4 years ago

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:

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

MRVDH commented 4 years ago

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

haoqunjiang commented 4 years ago

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

cioccarellia commented 3 years ago

Any update on this one?