I have project which has code targeting both browser and node. It has .babelrc
file for the browser code. But when I'm running tests for the node code using Jest it always reads the .babelrc
file which is not required.
So I can somehow disable it?
You need to create an additional jest setting file for your node test. In this file set transform
to an empty object. To use this file you need to call jest with the --config
option pointing to your node jest setting.
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.