SystemLight
V2EX  ›  webpack

webpack5 打包后为何最外层使用的是箭头函数包裹,能否去掉?

  •  
  •   SystemLight · Jan 19, 2021 · 3734 views
    This topic created in 2123 days ago, the information mentioned may be changed or developed.

    webpack5 打包后如下,并非 babel 配置问题,包裹内的代码没有问题。

    (()=>{"use strict";console.log("hello")})();
    
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4404 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 07:59 · PVG 15:59 · LAX 23:59 · JFK 02:59
    ♥ Do have faith in what you're doing.