Skip to content

⚠️ Unnecessary addition ____exports #157

@idrevnii

Description

@idrevnii

Describe the bug

If you call an exported function in its own file, the build will add ____exports to its call, which will result in nil in the runtime.

To Reproduce

Steps to reproduce the behavior:

  1. Create two files first.ts and second.ts
  2. In first.ts write two functions export function func1 () { ... } and export function func2 () { func1() }
  3. In second.ts write function function func3() { func1(); func2() }
  4. Built this and in file first.lua in func2 insead of func1() call will be ____exports.func1() which will lead to nil in runtime

Expected behavior

Correct functional call

Screenshots (If my explanation is unclear :D)

image
image
image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions