aboutsummaryrefslogtreecommitdiffhomepage
path: root/tsconfig.json
diff options
context:
space:
mode:
authorlutangar <johan.dufour@gmail.com>2021-11-02 19:11:20 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-12-16 10:08:43 +0100
commit06aad80165d09a8863ab8103149a8ff518b10641 (patch)
treea97fa31f3ade29ff807ca1b77704eb47085ab99d /tsconfig.json
parent854f533c12bd2b88c70f9d5aeab770059e9a6861 (diff)
downloadPeerTube-06aad80165d09a8863ab8103149a8ff518b10641.tar.gz
PeerTube-06aad80165d09a8863ab8103149a8ff518b10641.tar.zst
PeerTube-06aad80165d09a8863ab8103149a8ff518b10641.zip
chore(refactor): remove shared folder dependencies to the server
Many files from the `shared` folder were importing files from the `server` folder. When attempting to use Typescript project references to describe dependencies, it highlighted a circular dependency beetween `shared` <-> `server`. The Typescript project forbid such usages. Using project references greatly improve performance by rebuilding only the updated project and not all source files. > see https://www.typescriptlang.org/docs/handbook/project-references.html
Diffstat (limited to 'tsconfig.json')
-rw-r--r--tsconfig.json51
1 files changed, 7 insertions, 44 deletions
diff --git a/tsconfig.json b/tsconfig.json
index 075a3d86e..a14a97dfb 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,46 +1,9 @@
1{ 1{
2 "compilerOptions": { 2 "extends": "./tsconfig.base.json",
3 "module": "commonjs", 3 "references": [
4 "target": "es2015", 4 { "path": "./shared" },
5 "noImplicitAny": false, 5 { "path": "./server" },
6 "sourceMap": false, 6 { "path": "./scripts" }
7 "experimentalDecorators": true, 7 ],
8 "emitDecoratorMetadata": true, 8 "files": ["server.ts"]
9 "importHelpers": true,
10 "removeComments": true,
11 "strictBindCallApply": true,
12 "esModuleInterop": true,
13 "forceConsistentCasingInFileNames": true,
14 "outDir": "./dist",
15 "lib": [
16 "dom",
17 "es2015",
18 "es2016",
19 "es2017",
20 "es2018",
21 "es2019"
22 ],
23 "typeRoots": [
24 "node_modules/@types",
25 "server/typings"
26 ],
27 "baseUrl": "./",
28 "paths": {
29 "@server/*": [ "server/*" ],
30 "@shared/*": [ "shared/*" ]
31 }
32 },
33 "exclude": [
34 "server/tools/",
35 "node_modules",
36 "dist",
37 "storage",
38 "client",
39 "test1",
40 "test2",
41 "test3",
42 "test4",
43 "test5",
44 "test6"
45 ]
46} 9}