Subscribe on changes!

Assets change should update with hmr

avatar
May 14th 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.

avatar
Jun 2nd 2020

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.

avatar
Jun 3rd 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.

avatar
Jan 8th 2021

Closing (stale)