I'm encountering a strange issue, possibly a bug, with importing a JSON file as an object into my application. I have the following configurations:
"compilerOptions": {
"resolveJsonModule": true,
"esModuleInterop": true,
}
While it appears that the JSON is being imported based on the source and debugger, my application claims that the variable is undefined. Could this be related to a caching problem during the build process? I am importing the JSON file like this:
import * as eventsDB from './events.json';
For debugging purposes, I export it as follows:
export const jsonDB = eventsDB;
EDIT: After carefully reviewing the entire reducer where I import and export the JSON, I realized that everything was omitted in the build, yet somehow present in the Source-Maps. I am currently investigating possible reasons for this discrepancy.