Javascript – NodeJS – How do I call separate imports based on 'if' condition for ES Modules?
Followed a tutorial that uses CommonJS to export/require different keys based on the environment. How do I get it to work with ES Modules import/export? This was the code he used: if (process.env.NODE_ENV === "production") { module.exports = require('./prod') else…