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

fix: ensure bundler module resolution works with runtime type imports #2470

Merged
merged 4 commits into from Dec 19, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves #2469

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This adds support for Bundler TypeScript module resolution. It changes extensions of runtime dir files to .js which should be safe as this is a type: module project.

I also add a subpath for @nuxt/content/dist/runtime/types as this is already documented. But we could also have a more ergonomic subpath for type augmentation.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added the bug Something isn't working label Dec 19, 2023
@danielroe danielroe self-assigned this Dec 19, 2023
Copy link

Deploying with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: f492947
Status:Β βœ…Β  Deploy successful!
Preview URL: https://b02e475c.nuxt-content-1il.pages.dev
Branch Preview URL: https://fix-bundler-resolution.nuxt-content-1il.pages.dev

View logs

@danielroe danielroe changed the title build: emit .js files within runtime directory fix: ensure bundler module resolution works with runtime type imports Dec 19, 2023
package.json Show resolved Hide resolved
Co-authored-by: Daniel Roe <daniel@roe.dev>
@farnabaz farnabaz merged commit dff252b into main Dec 19, 2023
2 checks passed
@farnabaz farnabaz deleted the fix/bundler-resolution branch December 19, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

not compatible with TypeScript Bundler module resolution
2 participants