SystemLight
V2EX  ›  webpack

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

  •  
  •   SystemLight · Jan 19, 2021 · 3737 views
    This topic created in 2124 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   ·   2101 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 09:00 · PVG 17:00 · LAX 01:00 · JFK 04:00
    ♥ Do have faith in what you're doing.