如何让Chrome重新载入来源地图? [英] How to get Chrome to reload source maps?

查看:203
本文介绍了如何让Chrome重新载入来源地图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Chrome Dev 27,并在开发工具设置中选中了停用缓存。当我重新载入网页时,Chrome会正确重新载入地图页面使用的所有资源,包括 .js 档案。但是,它不会自动重新加载相应的源映射 .map 。监控Chrome的应用程式之间的HTTP流量,在后续网页载入时,我没有看到Chrome为 .map 档案提出任何要求。

I am on Chrome Dev 27, and in the Dev Tools settings checked Disable cache. When I reload a page, Chrome properly reloads all the resources used by map page, including the .js files. However, it doesn't automatically reload the corresponding source maps .map. Monitoring the HTTP traffic between Chrome my app, on subsequent page load, I don't see any request from Chrome for the .map files. How can I get Chrome to also reload the source maps?

Chrome的问题不会重新载入 .map 文件是它也不会重新加载生成 .js 的文件,在我的情况下恰好是一个CoffeeScript文件( .coffee c>),这意味着在调试时,在选项卡中,我正在查看 .coffee 即使新代码(来自 .js )正在运行。

The issue with Chrome not reloading the .map file is that it also won't reload the file from which the .js was generated, which in my case happens to be a CoffeeScript file (.coffee), which means that when debugging, in the Sources tab I am looking at an old version of the .coffee file, even if the new code (from the .js) is running.

推荐答案

我今天也有同样的问题。等待为我解决它是关闭咖啡文件的标签下的来源,进入网络标签,右键单击,然后选择清除浏览器缓存

I had this same issue just today. The wait to solve it for me was to close the coffee file's tab under sources, go to the network tab, right click, and select "Clear Browser Cache"

此固定对我来说。

也就是说,映射文件并不总是在我的缓存卡住...只有有时,当它们,缓存技巧修复它。

That said, the mapped files don't always get "stuck" in cache for me... Only sometimes, and when they do, the clear cache trick fixes it.

这篇关于如何让Chrome重新载入来源地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆