Debug source maps loading on Chrome

廉价感情. 提交于 2020-01-03 18:43:08

问题


I generate source maps for javascript files during minification. The map files are referenced using a relative URL from the minified JS files that sit next to the map files. Here is an example comment at the end of app-e47a6637.js:

//# sourceMappingURL=app-e47a6637.js.map

The source map resolution works as expected in Firefox. However, Chrome does not load the map files.

Additional information:

  • JS source maps are of course enabled in the settings.
  • I tried putting a proxy between Chrome and the server. Chrome does not even request the map files.
  • I use gulp-sourcemaps to generate the map files.
  • I don't want to use the workspace feature of Chrome. I just want it to display the original source files.

How can I enable source maps in Chrome?

来源:https://stackoverflow.com/questions/34138737/debug-source-maps-loading-on-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!