Source Maps not working with Webpack

前端 未结 4 873
时光取名叫无心
时光取名叫无心 2021-01-01 09:58

I\'m pretty new to webpack and having some trouble configuring it to produce the necessary source maps. In the devtools it says

Source Map detected

4条回答
  •  清歌不尽
    2021-01-01 10:08

    The issue I was facing was in my nginx configuration. My nginx configuration was throwing 404 for the source map files, because it couldn't identify the .map files where to look for. So added .map also in addition to .js|.css and it was fixed.

    location ~* \.(?:css|js|map)$ {
      expires 1y;
      access_log off;
      add_header Cache-Control "public";
    }
    
    

提交回复
热议问题