Skip to content

Gandi/babel-preset-gandi

Repository files navigation

babel-preset-gandi

Shareable Babel preset for Gandi.
Includes ES2022+, React, Flow, Typescript as well as common transforms and polyfills.

Installation

$ npm install --save-dev @gandi/babel-preset-gandi

Flow

Usage

Add the following line to your .babelrc file:

{
  "presets": ["@gandi/gandi"]
}

Pass options to babel-preset-env

{
  "presets": [["@gandi/gandi", { "modules": "false" }]]
}

See the full list of available options.

Typescript

Usage

Add the following line to your .babelrc file:

{
  "presets": ["@gandi/babel-preset-gandi/typescript"]
}

Pass options to babel-preset-env

{
  "presets": [["@gandi/babel-preset-gandi/typescript", { "modules": "false" }]]
}

See the full list of available options.

Browsers support

You should have a .browserslistrc file at the root of your project.
We use the defaults query.

Or programmatically:

// Client
{
  targets: { browsers: 'defaults' },
  presets: [['@gandi/gandi', { modules: false }]],
  babelrc: false,
}
// Server
{
  targets: { node: 24 },
  presets: [['@gandi/gandi', { modules: false }]],
  babelrc: false,
}

Changelog

All notable changes to this project will be documented in this section.

This project adheres to Semantic Versioning and Keep A Changelog.

Found a bug or contribute?

Please open an issue. If it's clear and well labelized, it's quicker to fix!

Else you can start contributing.

Code of conduct

Be nice. Thanks.

Contributors

(People who have been involved in @gandi/babel-preset-gandi)

  • Julien Muetton @themouette
  • Yann Brelière @yanndinendal
  • Alexis Mineaud @cr0cK
  • Arthur Gautier @baloo
  • Timothée Pillard @ziir

License

ISC.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors