I try to write my code in ES6 standard but when I try to import a .json it fails on me.
import JsonT from "../../Data/t.json" //not working
var JsonT = require('../../Data/t.json'); //working
Can someone explain what I do wrong?
I use it then like this:
console.log(JasonT);
importis not supported by Node.JS yet. You can use Babel if you want to use that.import JsonT from "../../Data/t"as suggested in linked question?