Webpack source maps pointing to minified bundle

僤鯓⒐⒋嵵緔 提交于 2019-12-05 12:22:14

I did try to reproduce the problem and I found this. Maybe this is not where you looking for.

After bundling the code with webpack the code is throw a error in the Chrome console.

When I click on the main.js:2166 link, the browser is navigate me to the bundled code.

When I refresh the Chrome browser I see a link to the orginal file 'layout.js'.

Clicking on this link will bring me to the unbundled code.

If I build the webpage with Webpack with devtool: 'eval-source-map' I get the same result as with Webpack-dev-server. You can check if the build js files have an embedded sourceMap.

The only way I could replicate your issue is when I disabled source maps in Chrome settings:

I was getting something like this:

When I enabled source maps, I got something like the image below. By clicking on the filename on the up right side, I was taken to the correct place.

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