yazoox

现在哪些情况,还需要使用 babel 去转换?

  •  
  •   yazoox · Sep 28, 2021 · 2140 views
    This topic created in 1687 days ago, the information mentioned may be changed or developed.

    发现,现在 typescript 好像就支持直接编译输出指定版本的 javascript, 比如"target": "es2015", etc.

    那么,现在还有哪些,是需要 babel 的?或者说,如果开发语言选择 typescript 的话,就可以不再引入 babel 了?

    谢谢!

    3 replies    2021-09-30 15:08:44 +08:00
    Pastsong
        1
    Pastsong  
       Sep 28, 2021
    或者你可以只用 babel 做转换, ts 只做类型检查,效率高一点
    makelove
        2
    makelove  
       Sep 28, 2021
    tsc 只用来开发时类型检查
    Vite 之类新出的打包工具都转用 esbuild 了,开发体验比 tsc 更快,确时不用 babel 了
    wizardpisces
        3
    wizardpisces  
       Sep 30, 2021
    babel 不需要,polyfill 跑不掉
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3333 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 13:13 · PVG 21:13 · LAX 06:13 · JFK 09:13
    ♥ Do have faith in what you're doing.