nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Missing .d.mts files in /dist/runtime folder

Open zsilbi opened this issue 1 year ago • 4 comments

Environment

[email protected] [email protected]

Reproduction

  1. Build nitro
  2. Check /dist/runtime folder

Describe the bug

In package.json there are exports defined for the runtime folder:

    "./runtime/*": {
      "types": "./dist/runtime/*.d.mts",
      "import": "./dist/runtime/*.mjs"
    },
    "./dist/runtime/*": {
      "types": "./dist/runtime/*.d.mts",
      "import": "./dist/runtime/*.mjs"
    },

The .d.mts files are missing.

Additional context

If I add (for example) "src/runtime/timing" to the entries in build.config.ts, it works as expected, the dist/runtime/timing.d.mts file is created.

Logs

No response

zsilbi avatar Mar 18 '24 10:03 zsilbi

it might be an issue but please reopen with reproduction 🙏🏼

pi0 avatar Mar 18 '24 11:03 pi0

@pi0 the issue is with the Nitro build itself, not in a project built with Nitro

zsilbi avatar Mar 18 '24 12:03 zsilbi

how it makes an issue with your external usage? (again, i understand it is an issue, but in order to track any issue report, this is expected, otherwise i have to try to make first setup first).

pi0 avatar Mar 18 '24 12:03 pi0

Thank you for the explanation, you can find the reproduction here: https://github.com/zsilbi/nitro-mts-repro

A temp. fix is to modify package.json from *.d.mts to *d.ts for the runtime entries.

zsilbi avatar Mar 18 '24 13:03 zsilbi