gancl
V2EX  ›  React

react electron webpack 怎么取消压缩代码, 不然客户端报错都定位不到在哪一行报错

  •  
  •   gancl · Oct 22, 2018 · 2920 views
    This topic created in 2958 days ago, the information mentioned may be changed or developed.

    react electron 遇到崩溃就白屏,给组件加了<errorboundary>虽然被捕获但是不能定位到具体哪一行,只能让客户不能用了再重启. 要怎么解决? 正式发布的代码都压缩了没法看报错在哪一行</errorboundary>

    4 replies  •  2018-10-22 23:17:07 +08:00
    gancl
    gancl
    OP
    Oct 22, 2018
    1
    我的项目里都没配置 uglifyjs
    Trim21
    Trim21
    Oct 22, 2018 via Android
    2
    启用一下 source map ?
    gancl
    gancl
    OP
    Oct 22, 2018
    3
    怎么启用 source map ? 启用了通过报错堆栈就可以马上定位到哪一行代码吗? 通过都是如"UserName" of undefined
    gancl
    gancl
    OP
    Oct 22, 2018
    4
    #2 @Trim21 怎么启用 source map ? 启用了通过报错堆栈就可以马上定位到哪一行代码吗? 通过都是如"UserName" of undefined
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1200 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:49 · PVG 01:49 · LAX 09:49 · JFK 12:49
    ♥ Do have faith in what you're doing.