I'm trying to export one object array file to nodeJS and ReactJS.
for example:
config.js
const config = {
mode: "active",
}
export default config;
I need to import this to the nodeJS file. At that time it's showing error on the export tag.
I tried this way:
exports.config = {
mode: "active",
}
//export default config;
It's working on nodeJS. but I can't use this file to react. is there any possible way of using the same file for both.
NB: node version: v12.13.0
import { config } from './config'to import the config file