0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 06:50:43 -05:00
Changes the following:

- New targets, module and moduleResolution for mods
- Enables `isolatedModules` as this matches the SPT server.
- Includes user/mods in tsconfig.json to allow for mods to be loaded
when a debugger is attached.
This commit is contained in:
Jesse 2025-01-14 13:10:31 +01:00 committed by GitHub
parent 4baab4e3f5
commit a285cd3985
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -57,9 +57,9 @@ export class ModCompilerService {
return this.compile(modTypeScriptFiles, { return this.compile(modTypeScriptFiles, {
noEmitOnError: true, noEmitOnError: true,
noImplicitAny: false, noImplicitAny: false,
target: ScriptTarget.ES2022, target: ScriptTarget.ESNext,
module: ModuleKind.CommonJS, module: ModuleKind.Preserve,
moduleResolution: ModuleResolutionKind.Node10, moduleResolution: ModuleResolutionKind.NodeNext,
sourceMap: true, sourceMap: true,
resolveJsonModule: true, resolveJsonModule: true,
allowJs: true, allowJs: true,
@ -67,6 +67,7 @@ export class ModCompilerService {
downlevelIteration: true, downlevelIteration: true,
experimentalDecorators: true, experimentalDecorators: true,
emitDecoratorMetadata: true, emitDecoratorMetadata: true,
isolatedModules: true,
rootDir: modPath, rootDir: modPath,
}); });
} }

View File

@ -17,5 +17,5 @@
"@tests/*": ["./tests/*"] "@tests/*": ["./tests/*"]
} }
}, },
"include": ["src/*", "src/**/*"] "include": ["src/*", "src/**/*", "./user/mods/**/*"]
} }