babel-preset-omit-plugins
v0.1.0
Published
Omit certain plugins from a Babel preset
Downloads
2
Readme
babel-preset-omit-plugins
Omit certain plugins from a Babel preset.
WARNING: This package is not yet stable. Please take special care before using it in a production environment.
Usage
npm install --save-dev babel-preset-omit-plugins
// babel.config.js
module.exports = {
presets: [
['babel-preset-omit-plugins', {
preset: 'preset-module',
plugins: [
'plugin-module-1',
'plugin-module-2',
// ...
],
}],
],
}
For example, if you are using the Vue CLI and want to disable the Decorators, you can:
// babel.config.js
module.exports = {
presets: [
['babel-preset-omit-plugins', {
preset: '@vue/cli-plugin-babel/preset',
plugins: [
'@babel/plugin-proposal-decorators',
],
}],
],
}
If you need to provide options for the passed presets, you can use the array syntax of Babel configuration:
// babel.config.js
module.exports = {
presets: [
['babel-preset-omit-plugins', {
preset: [
'@vue/cli-plugin-babel/preset',
{
// For example only
targets: { esmodules: true },
},
],
plugins: [
'@babel/plugin-proposal-decorators',
],
}],
],
}