X Tutup
Skip to content

TSTL creates 0 byte JSON files for no reason #1059

@Zamiell

Description

@Zamiell

Steps to reproduce:

  1. Set up a hello-world TSTL project.
  2. Add "resolveJsonModule": true to the tsconfig.json file.
  3. Make a sample JSON file, something like:
{
  "things": [
    {
      "foo": 1,
      "bar": 2
    },
    {
      "foo": 1,
      "bar": 2
    }
  ]
}
  1. Use the following main.ts file:
import * as thingsJSON from "./things.json"

print(thingsJSON.things[0].foo);
  1. Compile the project, which will produce a main.lua file and a 0 byte things.json file in the output directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscope: transpileAny transpilation not directly related to code transforms

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup