Hello,
I have the following structure in my app:
.
..
src <= nestJS Folder
shared <= a folder shared by my frontend and my backend
When using tsc as builder, in my dist folder two folders are created:
src, and shared, just as expected.
However, when using swc, the shared folder is ignored, and my dist folder only contains the content of src
Do you have any idea on how I could fix that?
My tsconfig.json:
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"declaration": false,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": false,
"importHelpers": true,
"incremental": true,
"lib": ["es2021"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./dist",
"paths": {
"@myapp/shared": ["shared/src"],
"@myapp/*": ["src/libs/*"]
},
"removeComments": true,
"resolveJsonModule": true,
"rootDir": ".",
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"strictPropertyInitialization": false,
"sourceMap": true,
"strict": true,
"target": "es2015"
}
}
My nest-cli.json
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"root": "src",
"compilerOptions": {
"builder": { "type": "tsc", "options": { "copyFiles": true } },
"assets": ["./shared"]
}
}
Thanks for your help ☃️