Current Size:
Chakra BreakPoints
base0px
sm480px
md768px
lg992px
xl1280px
2xl1536px
Current Height:Width
widthpx
heightpx

Subjects

Light Babel Node Config

Date Created: 2019/07/21

Last Update: 2022/10/02

#dev-env #config #notes

Source from rw;eruch

What is this?

This post is personal reference

TL:DR

The other day I started building an APi first project with Node and express and I have become so accustom out of the box support for ES6 for the last few years using

, or hoping into a that when import express from 'express' exploded I was a little taken aback...:blush:

Naturally I Googled "Nodejs Babel Config" and the one I liked was

. Being particularly lazy and also aware that I have configured a node project for ES6 a thousand times. I quickly scrolled to the few command I needed which are listed below.

The Commands and Files

npm i --save-dev nodemon @babel/core @babel/node @babel/preset-env

.babelrc

{
"presets": ["@babel/preset-env"]
}

package.json

...
"scripts: {
...
"dev": "nodemon --exec babel-node app.js"
...
}
....

Notes:

In this particular project I ended up using webpack for my build due to the way

handles deployment.

More Notes

All Notes
HomeProjects

Links

Home Articles Notes Projects About Style Guide Site Credits

Contact

 [email protected]

Location

🌎 Earth