tronic-plugin-babeldeprecated

Babel plugin for tronic with predefined defaults

Usage no npm install needed!

<script type="module">
  import tronicPluginBabel from 'https://cdn.skypack.dev/tronic-plugin-babel';
</script>

README

tronic-plugin-babel

Babel plugin for tronic with predefined defaults

Getting started

Install with npm:

npm install --save-dev tronic-plugin-babel

Setup

Create a tronic.config.js file at the root of your project with the following content:

module.exports = {
  plugins: [
    'tronic-plugin-babel'
  ]
}

Configuration

You may configure the plugin using any of the options available for babel-loader. The options you specify will be merged with the defaults, so there's no need to redefine existing properties.

You can do so as below:

module.exports = {
  plugins: [
    {
      name: 'tronic-plugin-babel',
      options: {
        babelLoader: {
          plugins: ['transform-optional-chaining']
        }
      }
    }
  ]
}