V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
gancl
V2EX  ›  React

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

  •  
  •   gancl · Oct 22, 2018 · 2673 views
    This topic created in 2747 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
        1
    gancl  
    OP
       Oct 22, 2018
    我的项目里都没配置 uglifyjs
    Trim21
        2
    Trim21  
       Oct 22, 2018 via Android
    启用一下 source map ?
    gancl
        3
    gancl  
    OP
       Oct 22, 2018
    怎么启用 source map ? 启用了通过报错堆栈就可以马上定位到哪一行代码吗? 通过都是如"UserName" of undefined
    gancl
        4
    gancl  
    OP
       Oct 22, 2018
    #2 @Trim21 怎么启用 source map ? 启用了通过报错堆栈就可以马上定位到哪一行代码吗? 通过都是如"UserName" of undefined
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2454 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 66ms · UTC 04:50 · PVG 12:50 · LAX 21:50 · JFK 00:50
    ♥ Do have faith in what you're doing.