Skip to content

Commit

Permalink
fix(backend): docker build and tsc output directory structure (#1177)
Browse files Browse the repository at this point in the history
* chore(backend): copy tsconfig.build.json in Dockerfile

* chore(backend): reverted rootDir and baseUrl in tsconfig
  • Loading branch information
lamkeewei committed May 7, 2021
1 parent 6944401 commit b9d498e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN npm ci

COPY src ./src
COPY tsconfig.json ./
COPY tsconfig.build.json ./

RUN npm run build
RUN npm prune --production
Expand Down
14 changes: 7 additions & 7 deletions backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./build", /* Redirect output structure to the directory. */
"rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "incremental": true, /* Enable incremental compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
Expand Down Expand Up @@ -51,13 +51,13 @@

/* Module Resolution Options */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
"baseUrl": "./src", /* Base directory to resolve non-absolute module names. */
"paths": {
"@core/*": ["src/core/*"],
"@sms/*": ["src/sms/*"],
"@email/*": ["src/email/*"],
"@telegram/*": ["src/telegram/*"],
"@test-utils/*": ["src/test-utils/*"],
"@core/*": ["core/*"],
"@sms/*": ["sms/*"],
"@email/*": ["email/*"],
"@telegram/*": ["telegram/*"],
"@test-utils/*": ["test-utils/*"],
}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
Expand Down

0 comments on commit b9d498e

Please sign in to comment.