Skip to content
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

Assets change should update with hmr #139

Closed
underfin opened this issue May 14, 2020 · 3 comments
Closed

Assets change should update with hmr #139

underfin opened this issue May 14, 2020 · 3 comments

Comments

@underfin
Copy link
Member

underfin commented May 14, 2020

Assets don't update with hmr when assets file is changed.It is happend with two backgorud ways.

  1. Just use in sfc template with <img src="/public/a.svg" />.
    Reson:It need analyze assets reference in vue file.But it not support on now.It may be stuff to do.

2.Use in sfc script with import a from './public/a.svg'
It is not work with hmr.
Reson: it not update component (has static props (like {a: './public/a.svg' }) ) with hmr reload is triggered.
Soultion:
-Maybe can unmount component and remount new component. May add hmr api.like vue-remount to reslove this.
-Maybe just full reload with page.

@diegoleme
Copy link

I believe that this problem has already been solved. I just tested it with version 0.20.2 and I couldn't reproduce it.

@underfin Please provide a link to a repo that can reproduce the problem you ran into.

@underfin
Copy link
Member Author

underfin commented Jun 3, 2020

Yeah.This case can work with import a from './public/a.svg'.
But use in sfc template with <img src="/public/a.svg" /> is still not work with hmr.

underfin added a commit to rolldown/vite that referenced this issue Jun 7, 2020
@yyx990803
Copy link
Member

Closing (stale)

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants