Assets change should update with hmr
Assets don't update with hmr when assets file is changed.It is happend with two backgorud ways.
- 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.
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.
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.