Babel-node does not ignore specified files / folder during compilation

I have a Node application using ES6 that I run with the following nodemon cluster.js --exec babel-node command.
I also have a .babelrc file:

 { "presets": ["es2015"], "ignore": [ "public" ] } 

The public folder contains interface files such as html, css and js. But when I edit the JS file in the shared folder, babel-node compiles my code, and I don't want this to happen.

+5
source share
1 answer

I think this is due to this error. Try using nodemon cluster.js --exec "babel-node --ignore public" .

+2
source

Source: https://habr.com/ru/post/1237046/


All Articles