I'm facing an issue where babel --out-file-extension
is not working as expected.
Below is my package.json
:
{
"name": "Assets",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"babel:dev": "babel --presets es2015 Scripts/src -d Scripts/js",
"babel:min": "babel --presets minify Scripts/src -d Scripts/js --out-file-extension .min.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"babel-preset-minify": "^0.5.1"
}
}
After running npm run babel:dev
, the result is :
Scripts\src\main.js -> Scripts\js\main.js
However, when I execute npm run babel:min
, the output files are minified but the file extension remains unchanged.
I need help in identifying what mistake I am making here.