You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been able to import json files using require("myfile.json");. I have some files that are actually json but are named with a different file extension (myfile.jlib for example). How can I require them as normal json without changing the filename?
The text was updated successfully, but these errors were encountered:
I'm not aware of a replacement for the CommonJS module loader (require()) other than to read the file in with something like fs.readFile() and calling JSON.parse() on the results.
I have been able to import json files using
require("myfile.json");
. I have some files that are actually json but are named with a different file extension (myfile.jlib
for example). How can I require them as normal json without changing the filename?The text was updated successfully, but these errors were encountered: