When using watch mode, the lualib_bundle output is strange from the third time onwards. · Issue #1575 · TypeScriptToLua/TypeScriptToLua · GitHub
Skip to content

When using watch mode, the lualib_bundle output is strange from the third time onwards. #1575

Open

Description

@nkari82

my tsconfig.js

{
  "compilerOptions": {
    "target": "esnext",
    "lib": [
      "esnext"
    ],
    "module": "commonjs",
    "types": [
      "@typescript-to-lua/language-extensions",
      "lua-types/jit",
      "projectdl"
    ],
    "strict": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "typeRoots": [
      "./types", "./node_modules"
    ],
    "rootDir": "ts",
    "outDir": "lua",
    "moduleResolution": "node",
    "resolveJsonModule": true
  },
  "tstl": {
    "luaTarget": "JIT",
    "noHeader": true,
    "luaLibImport": "require-minimal",
    "noImplicitSelf": true
  }
}
-- normal output
return {
  __TS__Class = __TS__Class,
  __TS__ArrayIndexOf = __TS__ArrayIndexOf,
  __TS__Iterator = __TS__Iterator,
  __TS__New = __TS__New,
  __TS__ObjectKeys = __TS__ObjectKeys,
  __TS__ArrayPush = __TS__ArrayPush,
  __TS__AsyncAwaiter = __TS__AsyncAwaiter,
  __TS__Await = __TS__Await
}

-- third time output
return {
  __TS__AsyncAwaiter = __TS__AsyncAwaiter,
  __TS__Await = __TS__Await,
  __TS__New = __TS__New,
  __TS__ObjectKeys = __TS__ObjectKeys
}

It outputs as if some exports are missing.

Activity

  1. Perryvw commented on Aug 29, 2024

    @Perryvw
    Member

    This is probably due to require-minimal, I'm guessing it no longer occurs when your set "luaLibImport": "require"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions