Created
June 15, 2017 07:30
-
-
Save lekhnath/303ba20f4c66315fab5ce8616a35ca00 to your computer and use it in GitHub Desktop.
Cannot import / require json files in javascript projects with checkJs enabled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Lekhnath Rijal" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = require('./config.json'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"checkJs": true, | |
"module": "commonjs", | |
"baseUrl": "./", | |
"target": "es5", | |
"lib": [ | |
"es6" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment