angular.min.js.map没有找到,究竟是什么? [英] angular.min.js.map not found, what is it exactly?

查看:1796
本文介绍了angular.min.js.map没有找到,究竟是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我加载页面,检查镀铬控制台我发现这些错误:

究竟是角度的地图文件?

我也引用angular.min.js但不是angular.min.js.map。
我使用的是1.2角RC版本的方式和我刚开始看到这些错误,当我切换到这个版本。

 错误:
GET HTTP://本地主机:44786 /脚本/角route.min.js.map 404(未找到):44786 /脚本/角route.min.js.map:1
GET HTTP://本地主机:44786 /脚本/角animate.min.js.map 404(未找到):44786 /脚本/角animate.min.js.map:1
GET HTTP://本地主机:44786 /脚本/角resource.min.js.map 404(未找到):44786 /脚本/角resource.min.js.map:1
GET HTTP://本地主机:44786 /脚本/ angular.min.js.map 404(未找到):44786 /脚本/ angular.min.js.map:1


解决方案

由于eaon21和猴子说,源地图文件基本上把缩小的code到其unminified版本进行调试。

您可以找到.MAP文件 href=\"http://$c$c.angularjs.org/1.2.12/\">。只需添加他们到同一个目录缩小的js文件,它会停止抱怨。他们得到牵强的理由是

  / *
// @ sourceMappingURL = angular.min.js.map
* /

在angular.min.js的末尾。如果你不希望添加的.MAP文件,你可以删除这些行,它会停止抓取操作,但如果你打算调试它总是好的,保持源链接的地图

When I load the page and check chrome console i find these errors:

what exactly are map files in angular?

I did reference the angular.min.js but not the angular.min.js.map. I am using the angular 1.2 rc release by the way and I just started seeing these errors when i switched to this release.

ERRORS:
GET http://localhost:44786/Scripts/angular-route.min.js.map 404 (Not Found)       :44786/Scripts/angular-route.min.js.map:1
GET http://localhost:44786/Scripts/angular-animate.min.js.map 404 (Not Found) :44786/Scripts/angular-animate.min.js.map:1
GET http://localhost:44786/Scripts/angular-resource.min.js.map 404 (Not Found) :44786/Scripts/angular-resource.min.js.map:1
GET http://localhost:44786/Scripts/angular.min.js.map 404 (Not Found) :44786/Scripts/angular.min.js.map:1

解决方案

As eaon21 and monkey said, source map files basically turn minified code into its unminified version for debugging.

You can find the .map files here. Just add them into the same directory as the minified js files and it'll stop complaining. The reason they get fetched is the

/*
//@ sourceMappingURL=angular.min.js.map
*/

at the end of angular.min.js. If you don't want to add the .map files you can remove those lines and it'll stop the fetch attempt, but if you plan on debugging it's always good to keep the source maps linked.

这篇关于angular.min.js.map没有找到,究竟是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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