简体   繁体   中英

Babel-node doesn't ignore specified files/folder on compilation

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

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

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

I think it's related to this bug. Try using nodemon cluster.js --exec "babel-node --ignore public" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM