Tips and tricks

Setup a .babelrc in your user directory

if you want to setup a global babelrc, create a file named .babelrc with these contents

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "useBuiltIns": "entry",
        "debug": true,
        "forceAllTransforms": true,
        "targets": {
          "chrome": "58",
          "esmodules": true,
          "ie": "11"
        }
      }
    ],
    "@babel/preset-react"
  ],
  "plugins": [
    [
      "@babel/plugin-transform-runtime",
      {
        "corejs": 3
      }
    ]
  ]
}

customize to your needs, then you should install in your home directory these dependencies:

npm i @babel/core@^7
npm i @babel/preset-env@^7
npm i @babel/preset-react@^7
npm i @babel/polyfill@^7
npm i @babel/runtime-corejs3@^7

Leave a comment

Your email address will not be published

{"type":"main_options","images_arr":"'#ffffff'","bg_slideshow_time":"0","site_url":"https:\/\/digitalzoomstudio.net","theme_url":"https:\/\/digitalzoomstudio.net\/wp-content\/themes\/qucreative\/","is_customize_preview":"off","gallery_w_thumbs_autoplay_videos":"off","base_url":"https:\/\/digitalzoomstudio.net"}