Babel

Learn how to customize Babel configuration

Babel is enabled by default within your project, you won't need to do additional work, by default, Frontal configures babel to use the @babel/preset-env.

However, if your project requires additional Babel configuration, you can simply do so, by installing the following packages within your project:

$ npm i @babel/core @babel/preset-env

After that, create a babel.config.json file within the root directory of your project with the following contents as an example:

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
          "edge": "17",
          "firefox": "60",
          "chrome": "67",
          "safari": "11.1"
        }
      }
    ]
  ]
}

You can refer to the Babel documentation for more information on how to configure Babel.

Would You Like To KnowAbout Our Next Products & Free Tools?