babel-preset-umeboshi
Standard Babel preset for Umeboshi templates
This preset includes:
Regenerator transform and generator polyfill are always included in order to support async/await and dynamic imports. If you won't use these features and wish to save some KB you can disable them via preset options.
Install
With npm:
npm install --save-dev babel-preset-umeboshi
Or yarn:
yarn add babel-preset-umeboshi --dev
Usage
Add the preset to .babelrc
file in your project's root folder.
{
"presets": ["umeboshi"]
}
Preset options
By default both async/await
and async import()
are supported. Anyway in order to support older environments the preset needs to transpile them to generators and include the related runtime. This will result in an increased bundle size.
If you plan not to use such features, or your target browsers already support them, you can disable them with the following setup:
{
"presets": [
["umeboshi", {
async: false,
asyncImport: false
}]
]
}