I installed below babel modules
npm install babel-cli babel-preset-env babel-preset-minify --save-dev
and package.json
has
"scripts": {
"build": "babel src -d dist --copy-files"
}
When I run the build with below .babelrc
configurations
{
"presets": [
"env"
],
"comments": false
}
It generates the non minified build into dist
directory.
But I want to also have the minified builds of as well along with non-minified ones. I tried adding both presets in .babelrc
as below
{
"presets": [
"minify", "env"
],
"comments": false
}
but it's not generating both the minified and non-minified builds. In this case only minified version is generated.
Is there any way to ask babel to create both minified & non-minified builds like index.js
& index.min.js
in the dist
directory.