New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to correrctly reference assets in development and deployment #9281

Closed
SumNeuron opened this Issue Jan 6, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@SumNeuron
Copy link

SumNeuron commented Jan 6, 2019

Version

2.5.21

Reproduction link

https://cli.vuejs.org/config/#baseurl

Steps to reproduce

use vue-cli to create an app

follow deployment guide https://cli.vuejs.org/config/#baseurl (make vue.config.js file with baseUrl)

import {baseUrl} and try to href/src=${baseUrl}/assets/mything.ext

What is expected?

file / img / etc retrieved

What is actually happening?

not found


this is for vue cli3

@posva

This comment has been minimized.

Copy link
Member

posva commented Jan 6, 2019

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server, gitter or StackOverflow.


using import imgURL from '@/assets/image.png' or directly in the src attribute (no v-bind): <img src="@/assets/image.png">

@posva posva closed this Jan 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment