0.2.6 • Published 2 years ago

@kiwicom/babel-preset v0.2.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@kiwicom/babel-preset

Kiwi.com's official Babel preset for our customer-facing apps. Works for Node and Webpack.

Setup

babel.config.js

module.exports = {
  presets: ["@kiwicom"],
};

Contains:

  • TypeScript
  • React
  • Styled components
  • Orbit components

Assumes:

  • absolute paths relative to the ./src (adjustable by babel-plugin-module-resolver)
  • using __DEV__ expressions as a process.env.NODE_ENV check

Configuration

You can adjust the options for @babel/preset-env as follows:

module.exports = {
  presets: [
    [
      "@kiwicom",
      {
        "preset-env": {
          // options accepted by preset-env, for example:
          target: { node: "current" },
        },
      },
    ],
  ],
};

License

MIT