/
tsconfig.react4xp.json
64 lines (60 loc) · 3.2 KB
/
tsconfig.react4xp.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ // https://www.typescriptlang.org/tsconfig
// "extends": "../../../tsconfig.json",
"compilerOptions": {
//──────────────────────────────────────────────────────────────────────
// Modules
//──────────────────────────────────────────────────────────────────────
"allowUmdGlobalAccess": true,
"baseUrl": ".",
"moduleResolution": "node",
"paths": {
// So one can import local files using absolute path same as
// * react4xp resolves during build time
// * and Enonic XP resolves during runtime
"/*": ["src/main/resources/*"], // This works during type checking
},
"rootDir": ".",
"typeRoots": [
"node_modules/@types",
"node_modules/@enonic-types"
],
//──────────────────────────────────────────────────────────────────────
// Interop Constraints
//──────────────────────────────────────────────────────────────────────
"allowSyntheticDefaultImports": true,
//──────────────────────────────────────────────────────────────────────
// Language and Environment
//──────────────────────────────────────────────────────────────────────
"jsx": "react",
"lib": [
"DOM", // console
"ES2015",
// See note above target
// "ES2016",
// "ES2017",
// "ES2018",
// "ES2019",
// "ES2020",
// "ES2021",
// "ES2022",
],
"noLib": false,
// As of 2023-03-15 GraalJS support ES2022
// https://github.com/oracle/graaljs/blob/master/docs/user/JavaScriptCompatibility.md
// But Almost every modern browser is still missing features from ES2017-ES2020
// https://stackoverflow.com/questions/61835971/es7-es8-es9-es10-es11-browser-support
// Since the output can be used both server-side (GraalJS) and
// client-side (modern browsers) we have to use the "lowest" supported version.
"target": "ES2015",
//──────────────────────────────────────────────────────────────────────
// Completeness
//──────────────────────────────────────────────────────────────────────
"skipLibCheck": true
},
"include": [
// "node_modules/typescript/lib/lib.es2015.d.ts",
// "node_modules/typescript/lib/lib.dom.d.ts",
"src/main/resources/**/*.tsx"
],
"exclude": [],
}