Migrate from rbxtsc
sloptor reads the same project files as rbxtsc: tsconfig.json, default.project.json, node_modules/@rbxts/*, and external transformer plugins. That makes the move short for most projects, but it isn't always a drop-in swap. Expect to change your scripts, and expect to check the first build.
What can break
Section titled “What can break”- The command line:
rbxtschas no subcommands and sloptor does. A script that runsrbxtsc --verbosehas to becomesloptor build --verbose, and tools that spawnrbxtscwith their own argument list need the same change. - Typechecking differs: sloptor typechecks with TypeScript 7's native checker, and
rbxtscbundles an older TypeScript. The two can disagree, sosloptor buildcan fail on a project that built fine before. One real 1,070-file project failssloptor checkwith fourTS2589errors for excessively deep type instantiation and oneTS2869for an unreachable??. Runsloptor checkbefore you edit your scripts. - The Luau: output is the same as
rbxtsc3.0.0 for most code, not all of it. Aswitchwith acaseafterdefault,switchcases that compare against the original operand, and numericforloops with changing bounds all emit differently on purpose. The changelog lists them. - Plugins: external transformer plugins still run, but through a Node sidecar. Only native Flamework and jecs skip it.
If a build fails or the output differs in a way this page doesn't cover, report it as a bug.
Swap the compiler
Section titled “Swap the compiler”Install sloptor, then replace rbxtsc in your scripts:
# beforerbxtsc -p tsconfig.json -w
# aftersloptor build -p tsconfig.json -wsloptor build accepts the rbxtsc-compatible flags. Booleans accept --flag, --flag=false, and --no-flag.
-p/--project,-b/--build [path],--builders <n>,--checkers <n>--singleThreaded,--emitDeclarationOnly,-w/--watch,--usePolling,--verbose--noInclude,--logTruthyChanges,--writeOnlyChanged,--optimizedLoops--writeTransformedFiles, which sloptor parses and ignores--type game|model|package,-i/--includePath,--rojo,--allowCommentDirectives,--luau
Sloptor adds --optimizedArrayAppends, the experimental --luauTypes, --timings, --max-errors, --json, --bell, and --no-clear.
A few rules apply to these flags:
--optimizedArrayAppendsreplaces eligible built-inArray.pushcalls in loops over fresh local arrays with loop-carried indexed writes. It defaults to off.--buildersrequires--build.--singleThreadedis the tsgo flag of the same name. When effective, it forces one solution builder and one checker per program, even if--buildersor--checkersare larger. There is no--parallelflag.--emitDeclarationOnlyrequires--build. You can't combine--build --watchwith declaration-only emit.- You can't combine
--timingswith--watch.
Run sloptor build --help for the rendered descriptions.
TypeScript build integrations may use the sloptor --build [path] form, or sloptor -b [path], which matches the TypeScript compiler's own invocation. Both are compatibility aliases for sloptor build --build [path]. The build subcommand is still the normal entry point.
You can also set options under the top-level "rbxts" key of tsconfig.json. The merge order is defaults, then rbxts, then the command line.
Behavior to expect
Section titled “Behavior to expect”pathis a project directory containing atsconfig.json. It defaults to the current directory.- Your project needs
node_modulesinstalled, because sloptor reads the same@rbxtstypes. - Exit code
0means success, and exit code1means a build problem: diagnostics or config errors. A usage error, such as an unknown flag or a bad value, exits2. Upstreamrbxtscexits1for usage errors too, so update a script that checks for exactly1. The one exception issloptor diagnostics, which reports instead of gating. See Diagnostics census. - Builds with external tsconfig transformer plugins need Node.js at runtime for the transformer sidecar.
Like rbxtsc, sloptor can't compile a standalone .ts file. It needs the rbxts project around it: package.json with @rbxts/compiler-types and @rbxts/types installed, tsconfig.json, and default.project.json.
Compatibility boundary
Section titled “Compatibility boundary”The verified @isentinel/roblox-ts@4.0.11 fork archive in roblox-ts.zip is the reference for behavior the fork changed: varargs optimization, object-rest direct access, the rbxts option cascade, .luau.map source maps, the copy-files gate, the Rojo resolver cache, solution builds, and solution watch. sloptor matches upstream for everything else.
Move Flamework to the native pipeline
Section titled “Move Flamework to the native pipeline”Remove rbxts-transformer-flamework from the effective tsconfig plugin list and add a [flamework] table to rotor.toml. If other plugins must run first, use after to name the preceding plugin. Keep the runtime flamework.json configuration.
Native Flamework reprints and re-parses every source by default, matching the upstream transformer's fresh source-file update per file. [flamework] skipUnchangedFiles = true (or the same key under a [flamework.profiles.<tsconfig>] entry) opts back into reusing sources the transform leaves unchanged, skipping the print/overlay/reparse pass for them.
Without an effective [flamework] table, sloptor runs rbxts-transformer-flamework through the Node sidecar. Native [flamework] and the legacy plugin are mutually exclusive, and configuring both is a hard error. Keep flamework.json in either mode: it's still the runtime configuration.
You can remove the old transformer package with your package manager once nothing uses it, because native Flamework builds don't need Node.js. External tsconfig transformer plugins still need Node.js, the bundled sidecar, and the project's typescript package.
Drop replaced plugins
Section titled “Drop replaced plugins”sloptor has built-in macros for two popular transformer plugins, so you can remove them from compilerOptions.plugins:
| Plugin | Built-in replacement |
|---|---|
rbxts-transform-env |
$env |
rbxts-transformer-keys |
$keys |
See Macros and extensions for the details, including how the modern import { $env } from "rbxts-transform-env" form keeps working through the sidecar.
Upgrading from earlier Sloptor toolchains
Section titled “Upgrading from earlier Sloptor toolchains”Sloptor now exposes seven compiler commands: build, check, diagnostics, clean, schema, completion, and version. Bundling, minification, model packaging, project scaffolding, cloud assets, and deployment are outside the compiler. Run Rojo or deployment tools yourself when your project needs them.
Keep only native Flamework and experimental parallelTransformers settings in rotor.toml. Executable rotor.config.ts and .js files are no longer loaded. Replace asset IDs and build or version-control stamps with explicit environment values or generated TypeScript inputs. Refresh or remove old generated editor declarations after upgrading.
Compiler .luau.map files and declaration maps still work. RuntimeLib, Promise, and local Lua/JSON output copying are still part of normal builds. Sloptor keeps the JavaScript createBuildSession() client and external before/after transformer plugins. Custom afterDeclarations transformers get a warning and sloptor skips them.