Getting Started With Babel - Transpiling Javascript
ฝัง
- เผยแพร่เมื่อ 9 ก.ย. 2024
- This is a fast getting started with Babel. In this video you will learn why do you need to transpile Javascript at all and how Babel comes into play, what babel packages do you need to install and how to use and configure Babel to transpile Javascript code. In this getting started with Babel you will learn everything that you need to know about it.
► CHECK MY COURSES - monsterlessons...
FOLLOW ME
► TWITTER - / monster_lessons
REFERENCES
► Source code - github.com/mon...
► Async await in JS - • Callback vs Promise vs...
RECOMMENDED VIDEOS
► Angular Tutorial for Beginners - • Angular Tutorial for B...
► Vue JS Crash Course - • Vue JS Crash Course fo...
► React Hooks Full Course - • React Hooks Tutorial f...
► Typescript Course for Beginners - • Typescript Crash Cours...
► Build a Todo App with Angular - • Build a Todo App With ...
STUFF I USE
► My mac mini for home on Amazon - geni.us/mADK6ob
► Mac macbook to go on Amazon - geni.us/t0fC
► My monitors on Amazon - geni.us/aRoFoR
► My mouse on Amazon - geni.us/FTzq
► My keyboard on Amazon - geni.us/wAjpl
► My Synology NAS on Amazon - geni.us/H9BeFo
► My Seagate IronWolf 4TB HDD on Amazon - geni.us/09Hvpm
► My external SSD drive on Amazon - geni.us/jg3MGNt
► My external HDD drive on Amazon - geni.us/5HCIAX
► My monitor arm on Amazon - geni.us/OuX1
► My chair on Amazon - geni.us/wGWq
► My speakers on Amazon - geni.us/wM4fIn
► My coffee machine on Amazon - geni.us/zP1uEbW
► My standing desk - www.fully.com/...
Disclosures: All opinions are my own. Sponsors are acknowledged. Some links in the description are affiliate links that if you click on one of the product links, I’ll receive a commission at no additional cost to you. As an Amazon Associate I earn a small commission from qualifying purchases.
WATCH NEXT: Javascript Interview Questions and Answers - Dominate Your Next Interview - th-cam.com/video/wnYKH2dO620/w-d-xo.htmlsi=5DfbGEfhXWiiv0a_
Thanks for a great intro to Babel :)
Glad you like it!
I have struggled with examples in books from reputable publishers and failed miserably: missing @, missing commas in .babelrc, @babel-cli instead of @babel/cli etc. etc. This video is a lifesaver. Slow, systematic, accurate. I am rushing to your other courses. Thank you so much.
Happy to hear that. This is why I never recommend books - they have typos and it's not the same like seeing in video that it works.
i really like your videos on ts.
they are awesome.
your voice and talking speed is perfect, i understand every single thing you explain properly.
Glad you like them!
I like you explaining things 👍
I appreciate that!
Oleks, great vid. Came here because I have a NodeJS project with D3.js lib that I try to PKG into an EXE. This does not work saying: "Warning Failed to make bytecode node10-x64 for ...". So I decided to babel my project. The question that I still have after watching the video: How can I babel a whole directory like "
ode_modules\d3\"
You can babel only prepared package. If d3 has commonjs module that you want to build it will work. But I didn't do anything with d3 long time so can't help here.
Well explained! Thanks a lot
Glad it was helpful!
amazing video! straight to the point!!!
Thank you!
Very nice and precise explanation
Thank you so much 🙂
excellent video! thank you!
Glad you liked it!
Great video!
Thanks!
great tutorial 👏, just a note - 9:45 - you pronounced "target" like it is an alien planet :D, I like it.
Oh thank you!
Awesome video! Thanks for the lesson. Reading the Babel docs was not very helpful but after watching your video it is starting to make sense. Plus you are using zsh!!! Love it. Are you using Vim/Neovim? If so, I was wondering what plugins do you use? I have been using Vim for the past 5 months and I finally feel a bit comfortable adding on to it.
Hi. I'm glad it was helpful.
Here is a video about Vim and what I use inside.
th-cam.com/video/YrLiugDhCuk/w-d-xo.html
Nice explain
Thank you
why do I keep getting "node_modules is not recognized as an internal or external command or batch file?
your command should start with ./node_modules/.....
Why not use "npx babel" instead of full relative path to babel command?
And you can create npm script to run babel compilation.
Sure, I just wanted to show how it really works underneath and from where babel runs.
I came here because for years I've been using babel cli, today I upgraded it (wanted some new ES features) and - what a surprise - it does not work! For some reason it “can't find find preset "@babel/preset-env" relative to directory "src"” or some bs (even though the preset is installed, apparently it's a Windows only issue). So now I have to learn about writing a config file ughhh I hate this so much. If I was a full-time JS coder I'd kms
turns out "babel-upgrade" package only updates your package.json but does not actually install all the packages for you, you must run "npm install" afterwards
Updates are always a pain to fix
Gem
Thank you!
In 2023 one should consider to leave babel out or remove it from the project. IE 11 usage statistics is on an all time low of beyond 0.5% globally. All other common browsers have adapted async await and of course ES6 features.
If ones application has elevated security requirements, like handling login and user data I would even suggest to keep the old browsers out.
Sure but the problem is we typically use framework tools like create-react-app and rarely setup babel ourselves. And in all these tools it is still inside.
This is just perfect
Thank you!