flamingo-carotene-babel
v9.0.0-alpha.13
Published
Provide the babel loader for a flamingo-carotene-webpack setup
Downloads
51
Readme
Module flamingo-carotene-babel
The babel module injects the babel loader into the webpack config of the Flamingo Carotene module.
When you want to write ES code that needs to be transpiled to use it in the client, this tiny module helps injecting the corresponding loader.
How to use
npm i -D flamingo-carotene-babel
The babel module will listen to the following commands: none.
Every config supported by the used babel version can be used with your custom babel config.
When there is no babel config available, this module provides the babel-preset-env as the default preset, so that you can use it right away.
Babel will respond to the browserslist config.
How it works
The module will check if there is a babel config available. When found it will look into the compiled webpack config for
a rule with a test of \.js$
(exact match only for now) and inject its loader config.
As babel config, the following configs will be found:
babel
property inside the package.json- files in the project root with these names:
.babelrc
,.babelrc.js
,babel.config.js