In my type script project I have this tsconfig
{
"compilerOptions": {
"outDir": "dist",
"sourceMap": true,
"noImplicitAny": true,
"moduleResolution": "Node",
"resolveJsonModule": true,
"module": "ESNext",
"target": "ESNext",
"lib": [
"ESNext", "DOM"
],
"allowJs": false,
"alwaysStrict": true,
"typeRoots": [
"node_modules/@types"
]
},
"include": [
"src/",
"src/**/*.json"
],
"exclude": [
]
}
And I have my source folder like this
After I run tsc, I get
Basically the subfolders js, json, units don't get put in the data in dist, yet its in the data folder in src. How can I fix this?
Note: I have a separate program (copyfiles) creating the data folder with images, but that is working and irrelevant to this issue.
see if adding root directory config in tsconfig solves it
{
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"sourceMap": true,
"noImplicitAny": true,
"moduleResolution": "Node",
"resolveJsonModule": true,
"module": "ESNext",
"target": "ESNext",
"lib": [
"ESNext", "DOM"
],
"allowJs": false,
"alwaysStrict": true,
"typeRoots": [
"node_modules/@types"
]
},
"include": [
"src/",
"src/**/*.json"
],
"exclude": [
]
}