I start to learn typescript today, and there's a problem.
Here is the filetree(after compiling):
dist
index.js
src
data.txt
index.ts
Here is ./src/index.ts:
import { readFileSync } from 'fs';
let data = readFileSync('./data.txt');
console.log(data);
After compiling with command "tsc", it creates ./dist/index.js, absolutely the file data.txt cannot be read correctly. How to make it the right path?