Version: 3.0.10
Using Compile Time Remote IDs
TypeScript Only
This functionality is only available to roblox-ts users. This is not possible in regular Luau.
This method uses a transformer called rbxts-transform-guid and is quite experimental.
Installation#
Once installed, you will need to configure it in your tsconfig.json under plugins:
Then if you want to create remote ids, you create a const enum like such:
uuid is important here, it's what tells our transformer to convert our enum values to guids at compile time.
Then in your definition file you can use it as such:
src/shared/remotes.ts
Then you can use it as such:
src/server/example.server.ts