I started using Nest.Js and I created a Full Stack App with this structure:
api: nestjs app
client: frontend app
models: shared models (interfaces only) between back and front
So I set alias path in tsconfig.json inside api folder to let it import shortly: import { User } from 'models/user.model'
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2017",
"sourceMap": true,
"incremental": true,
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"models/*": ["../models/*"]
}
}
}
The problem is that typescript is compiling and changing the root structure under dist folder and nest cli is not finding main.js file to start up the application.
Is there a way to move models folder and preserve nestjs structure?
Or maybe change nestjs config to start the app on api/src/main.js?

