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
Async support for legacy environment
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 transpilation by the following setup:
{
"presets": [
["umeboshi", {
async: false,
asyncImport: false
}]
]
}
Custom browserslist query
By default this plugin sets browserslist's support to ['> 0.25%', 'not op_mini all', 'not ie < 11']
. If you wish to use a different setup or prefer another source for queries, just set browserslist
option to false
:
{
"presets": [
["umeboshi", {
browserslist: false
}]
]
}