0๐
โ
No way to import modules using if / else โฆ
As the data I need to import according to the NODE_ENV are constant variables, I resolved to set them up directly into the imported file :
config.js
let coeff = process.env.NODE_ENV === 'testing' ? 0.1 : 1
export const WORKING_TIME = coeff * 60
export const RESTING_TIME = coeff * 60
export const KITTEN_TIME = 5 // each kitten is visible for 5 secs
๐คuser762579
Source:stackexchange.com