Project structure
A gamemode normally has three independently typed source contexts and one deployable output tree.
text
my-gamemode/
├─ src/
│ ├─ server/
│ │ └─ main.ts
│ ├─ client/
│ │ └─ main.ts
│ └─ shared/
│ └─ events.d.ts
├─ ui/
│ ├─ src/
│ └─ index.html
├─ client-resources/
│ └─ resources/
├─ dist/
│ ├─ config.json
│ └─ scripting/
│ ├─ server/main.js
│ └─ client/
├─ tsconfig.server.json
├─ tsconfig.client.json
└─ package.jsonCompile server and client code separately. Their declaration packages both define a global called vimp with different shapes, so including both in one TypeScript program produces incorrect types.
Everything under <scripts_path>/client/ is considered client content and is offered to connecting players. Do not place server source maps, secrets, database credentials, or node_modules there.
The server entry point has a fixed name: <scripts_path>/server/main.js. Client scripts and CEF assets live under the client tree and may refer to packaged files with package:// URLs.