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

[core] Add exports field and build proper ES modules (no import extensions variant) #821

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

michaldudak
Copy link
Member

This is a variant of #745 that does not require file extensions in import/export specifiers. It uses babel-plugin-add-import-extension to modify JS files and tsc-alias to modify type definitions.

I initially wanted to generate type definitions once, run tsc-alias on them and then copy them to /esm and /cjs directories, but tsc-alias looks for actual files the .d.ts file references, so it must be run in-place.

@michaldudak michaldudak added the core Infrastructure work going on behind the scenes label Nov 15, 2024
@michaldudak michaldudak changed the title [core] [core] Add exports field and build proper ES modules (no import extensions variant) [core] Add exports field and build proper ES modules (no import extensions variant) Nov 15, 2024
@mui-bot
Copy link

mui-bot commented Nov 15, 2024

Netlify deploy preview

https://deploy-preview-821--base-ui.netlify.app/

Generated by 🚫 dangerJS against d6e7a86

@Janpot
Copy link
Member

Janpot commented Nov 15, 2024

I'd expected the result after running tsc-alias to be the same regardless of esm or cjs. isn't that the case if you used the same file extension for both?

@oliviertassinari oliviertassinari added the scope: code-infra Specific to the code-infra product label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes scope: code-infra Specific to the code-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants