DEV Community

Thiago
Thiago

Posted on

Sucrase and nodemon ( import and export files)

firt install nodemon and sucrase:
-npm i nodemon sucrase --save-dev

Latter we need do nodemon register sucrase when run something on application.

1 - create a file called: nodemon.json and write on it:

{
"execMap":{
"js": "node -r sucrase/register"
}
}

2 - Create a file called server.js ( can be blanked) and edit package.json and inside scripts write on "dev"

"dev": "nodemon server.js"

should do the trick :)

Top comments (0)