Skip to content

Commit

Permalink
Mod fixes (#1080)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ArchangelWTF authored Jan 14, 2025
1 parent 4baab4e commit a285cd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions project/src/services/ModCompilerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,17 @@ export class ModCompilerService {
return this.compile(modTypeScriptFiles, {
noEmitOnError: true,
noImplicitAny: false,
target: ScriptTarget.ES2022,
module: ModuleKind.CommonJS,
moduleResolution: ModuleResolutionKind.Node10,
target: ScriptTarget.ESNext,
module: ModuleKind.Preserve,
moduleResolution: ModuleResolutionKind.NodeNext,
sourceMap: true,
resolveJsonModule: true,
allowJs: true,
esModuleInterop: true,
downlevelIteration: true,
experimentalDecorators: true,
emitDecoratorMetadata: true,
isolatedModules: true,
rootDir: modPath,
});
}
Expand Down
2 changes: 1 addition & 1 deletion project/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"@tests/*": ["./tests/*"]
}
},
"include": ["src/*", "src/**/*"]
"include": ["src/*", "src/**/*", "./user/mods/**/*"]
}

0 comments on commit a285cd3

Please sign in to comment.