babel-preset-min

A Preset containing default optimizations defined in babel-minify

Usage no npm install needed!

<script type="module">
  import babelPresetMin from 'https://cdn.skypack.dev/babel-preset-min';
</script>

README

babel-preset-min

This is a preset that uses the default options of babel-minify

Check babel-minify#options to find the default transformations applied or to find what exactly this preset will do.

WARNING: This might cause some regression, depending on what other plugins and presets you use with this preset - because all the plugins are applied in one pass by default in babel. You can enable the passPerPreset option in babel, but then all the babel-minify plugins are still applied in one pass. So, consider using babel-minify NodeAPI or CLI or Gulp task with the options - plugins: [] and presets: [] to pass your other plugins and presets.

Install

npm install babel-preset-min --save-dev

.babelrc

{
  "presets": ["min"],
  "comments": false,
  "compact": true,
  "minified": true,
  "passPerPreset": true
}