Last active
March 15, 2022 18:54
-
-
Save olygood/61774dcf1539d5ff85e5ce12681306b3 to your computer and use it in GitHub Desktop.
babel config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// install babel | |
// npm i @babel/core @babel/cli @babel/preset-env | |
//preset/env c est lui qui traduit l es6 | |
module.exports = { | |
presets: [["@babel/preset-env"]] | |
} | |
//package.json | |
// -o = output file le code traduction de es6 => javascript normal sort dans un autre fichier es6after.js | |
// ou --out-file | |
"babel": "babel es6.js -o es6after.js" | |
// execute le fichier qui est dans src et creer un repertoir dist avec la sortie du fichier | |
"babel": "babel src --out-dir dist" | |
//mais on utilise babel avec webpack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment