babel vs babel-core vs babel-runtime

前端 未结 3 1225
孤独总比滥情好
孤独总比滥情好 2020-12-24 04:28

My node webpack project uses three babel libraries. What\'s the difference between these and how are they being used?

\"dependencies\": {
  \"babel-runtime\"         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-24 05:15

    The Six Things You Need To Know About Babel 6 explained it quite well, to quote

    The babel npm package no longer exists. Instead, Babel has been split into multiple packages:

    babel-cli, which contains the babel command line interface babel-core, which contains the Node API and require hook babel-polyfill, which when required, sets you up with a full ES2015-ish environment To avoid accidental conflicts, make sure to remove any previous Babel packages like babel, babel-core, etc. from your package.json, and then npm uninstall them.

提交回复
热议问题