Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zsilbi opened this issue Mar 18, 2024 · 4 comments · Fixed by #2313
Closed

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

zsilbi opened this issue Mar 18, 2024 · 4 comments · Fixed by #2313

Comments

@zsilbi
Copy link
Contributor

zsilbi commented Mar 18, 2024

Environment

nitropack@2.9.4
unbuild@2.0.0

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

@pi0
Copy link
Member

pi0 commented Mar 18, 2024

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

@pi0 pi0 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
@zsilbi
Copy link
Contributor Author

zsilbi commented Mar 18, 2024

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

@pi0
Copy link
Member

pi0 commented Mar 18, 2024

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).

@zsilbi
Copy link
Contributor Author

zsilbi commented Mar 18, 2024

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.

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

Successfully merging a pull request may close this issue.

2 participants