Skip to main content

Export Modifier

The export modifier allows you to automatically aggregate things you want to export into a table.

Old Code
local version = 2

local function add(a, b)
return a + b

local class Bigint
chunks = {}

return {
version = version,
add = add,
Bigint = Bigint
New Code
export version = 2

export function add(a, b)
return a + b

export class Bigint
chunks = {}

The return statement is automatically generated.

Using Compatibility Mode?

You may need to use pluto_export instead of export.