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

windows 下 webstorm 的 webpack 监听问题 #183

Closed
yipanbo opened this issue Oct 20, 2016 · 13 comments
Closed

windows 下 webstorm 的 webpack 监听问题 #183

yipanbo opened this issue Oct 20, 2016 · 13 comments

Comments

@yipanbo
Copy link

yipanbo commented Oct 20, 2016

大神,求教个问题。
我使用了dva new project,然后使用webstorm这个ide来开发,用npm start来启动项目,但是遇到个问题,每次修改css,html之类的文件后,这些文件好像并不能及时地更新,或者说不能自动更新,js文件貌似是可以自动更新的。这就导致每修改一点东西,我都必须ctrl+c停止服务,然后npm start启动项目,这个问题有解决办法么?

@sorrycc
Copy link
Member

sorrycc commented Oct 20, 2016

应该不不行重启 npm start 的,手动刷新页面没有用?

@yipanbo
Copy link
Author

yipanbo commented Oct 20, 2016

是啊,刷新页面不起作用,必须重启服务。
或者大神开发时使用的是什么ide?我试试看有没有这种情况。非常感谢!

@nikogu
Copy link
Member

nikogu commented Oct 20, 2016

@yipanbo 看看是不是 file watch 冲突了

@yipanbo
Copy link
Author

yipanbo commented Oct 20, 2016

nikogu也是大神。我并没有设置其他的东西,我觉得最好是dva new出来项目之后,不用再做其他的配置就可以支持这种热更新最好。也可能是webstorm这类ide引起的?这个只是我的猜测。

@nikogu
Copy link
Member

nikogu commented Oct 20, 2016

@yipanbo 你换个编辑器看看具体问题,如果不行就重启下电脑,有时候是系统的文件监听系统有点问题,有时候重启可以搞好

@yipanbo
Copy link
Author

yipanbo commented Oct 20, 2016

大神遇到过这种问题没?顺便我也想问问大神用的ide是啥,换个ide试试效果。

@nikogu
Copy link
Member

nikogu commented Oct 20, 2016

我用的webstorm,但是我没遇到类似的问题,你打开 首选项,搜一下,filewatch看看

@sorrycc
Copy link
Member

sorrycc commented Oct 20, 2016

感觉和编辑器无关吧。

@nikogu
Copy link
Member

nikogu commented Oct 20, 2016

上次有个案例是 idea 有冲突,还有一次是重启电脑就好了

@yipanbo
Copy link
Author

yipanbo commented Oct 20, 2016

我刚才看了webstorm的file watch,里面显示no file watchers configured,还需要配置这个么?

@yipanbo
Copy link
Author

yipanbo commented Oct 20, 2016

突然想到一点,我的操作系统是win10,项目在c盘,会不会跟win10系统有关,或者c盘的权限有关?

@seamys
Copy link

seamys commented Oct 21, 2016

感觉和我遇到的问题一样。
Webpack watch not working on Webstorm on Windows?

seems Webpack watch doesn't work if the file is not saved directly. Please try turning 'Safe write' option ( Settings | Appearance & Behavior | System Settings | Use "safe write" (save changes to temporary file first)) off

@yipanbo
Copy link
Author

yipanbo commented Oct 21, 2016

@seamys 好像确实是你说的,晚上试一下,可以的话就可以结贴了,谢谢!

@sorrycc sorrycc changed the title dva中的热更新问题 windows 下 webstorm 的 webpack 监听问题 Oct 21, 2016
@sorrycc sorrycc closed this as completed Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants