-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Description
🐛 bug report
Fresh install of parcel outputs a wrong link for image defined in .vue files.
Folder structure:
|- App.vue
|- index.html
|- index.ts
|- logo.png
File contents example: https://gist.github.com/Hiryus/bde16ce5f0597efca5c3dbbd843e5f21
(use whatever image you want for logo.png - just adjust the src link in App.vue if needed)
The important file is App.vue file which contains a simple component with an image:
<template>
<div>Hello Vue!</div>
<img src="./logo.png" />
</template>🎛 Configuration (.babelrc, package.json, cli command)
Fresh configuration from npm create parcel vanilla my-parcel-app.
🤔 Expected Behavior
The image source is generated with a proper URL.
<body>
<div id="app" data-v-app="">
<div data-v-72751c="">Hello Vue!</div>
<img data-v-72751c="" src="/assets/logo_hash.png">
</div>
<script type="module" src="/test_parcel.34df32e0.js"></script>
</body>😯 Current Behavior
The image source contains {object Object]:
<body>
<div id="app" data-v-app="">
<div data-v-72751c="">Hello Vue!</div>
<img data-v-72751c="" src="[object Object]">
</div>
<script type="module" src="/test_parcel.34df32e0.js"></script>
</body>🔦 Context
One of the main advantage of parcel is it works fine in most context out of the box... except with vue.js where I can't make images work in a simple way.
🌍 Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 2.16.3 |
| Node | v22.15.0 |
| npm/Yarn | 11.7.0 |
Metadata
Metadata
Assignees
Labels
No labels