@common-web/babel

Common configuration for babel

Usage no npm install needed!

<script type="module">
  import commonWebBabel from 'https://cdn.skypack.dev/@common-web/babel';
</script>

README

Getting started

Install the pkg:

yarn:

yarn add @common-web/babel -D

npm:

npm install @common-web/babel --save-dev

in your repo create babel.config.js file then added the following:

Node (specific node preset)

// babel.config.js

// For node based presets
const getNodeBaseConfig = require('@common-web/babel/babel.config').getNodeBaseConfig;

module.exports = getNodeBaseConfig();

Other (use the base configuration)

// babel.config.js

// For other application, ex react
const getBaseConfig = require('@common-web/babel/babel.config').getBaseConfig;

module.exports = getBaseConfig();

Examples