Babel
Table of Contents
CLI
Integration with webpack
babel-loader
is awebpack
plugin.
Options
Plugins
- If the plugin is on
npm
, you can pass in the name of the plugin andbabel
will check that it’s installed innode_modules
"plugins": ["babel-plugin-myPlugin"]
- You can also specify an relative/absolute path to your
plugin/preset
. "plugins": ["./node_modules/asdf/plugin"]
You can omit
babel-plugin-
orbabel-preset-
prefixes
- Plugins run before Presets.
- Plugin ordering is first to last.
- Preset ordering is reversed (last to first).
Presets
env
Babel preset that automatically determines the Babel plugins you need based on your supported environments. Install with @babel/preset-env
, NOT babel-preset-env