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

Typescript下webpack热更新 actions多次执行 #1664

Open
wangqiang66 opened this issue Jan 9, 2020 · 0 comments
Open

Typescript下webpack热更新 actions多次执行 #1664

wangqiang66 opened this issue Jan 9, 2020 · 0 comments

Comments

@wangqiang66
Copy link

@wangqiang66 wangqiang66 commented Jan 9, 2020

Version

3.1.2

Reproduction link

http://localhost:9529/login

Steps to reproduce

  1. typescript 正常书写modules 例如添加
    @action
    public login() {}
  2. webpack 采用热更新方式
    3.修改modules代码 例如public login() { console.log(test)} 保存

What is expected?

执行login的时候的用更新的代码

What is actually happening?

以前的方法和新的方法都执行


热更新才会出现,需要动态的修改源码, 无法提供重现链接

正常打包不会出现这个问题,热更新的时候才会出现

查看store._actions 发现login对象是一个数组,有两条数据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.