VS代码+ Chrome调试+ react_create_app源映射

时间:2020-09-13 13:15:11

标签: reactjs google-chrome visual-studio-code chrome-debugging

我在vs代码中安装了chrome调试器。我使用以下启动配置:

      {
    "name": "React Playground Build",
    "type": "chrome",
    "request": "launch",
    "url": "http://localhost:4000",
    "webRoot": "${workspaceFolder}/react-playground/build",
    "sourceMapPathOverrides": {
      "*": "${webRoot}/*"
  }
  }

我使用npm build来创建生产版本,该版本可以通过serve -s build -l 4000服务 但是,断点不起作用。我认为它必须与sourceMapPathOverrides有关。在Chrome浏览器中,我还没有创建任何Webpack:

enter image description here

0 个答案:

没有答案