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

Add support for verbatimModuleSyntax with the umi renderer #240

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

4lve
Copy link

@4lve 4lve commented Oct 13, 2024

This adds a "fixer" for all imports so if they are PascalCase they get a type prefix which makes the renderer compatible with verbatimModuleSyntax

Copy link

changeset-bot bot commented Oct 13, 2024

⚠️ No Changeset found

Latest commit: 493fba9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there, thanks for tackling this in the Umi renderer but I think it'd be better if this implementation was consistent with the new web3.js renderer.

If you look at the renderers-js package, you'll see type MyType is supported and each type import must explicitly tell us it wants a type by important "type MyType". Then, on the ImportMap, we ensure that if we receive both "type MyType" and "MyType", then we only import the latter.

@4lve
Copy link
Author

4lve commented Oct 14, 2024

Hmm okay, I tried this first, but some imports were generated directly from shared types, but I will look into it if I stumble onto any issues further down

@4lve
Copy link
Author

4lve commented Oct 14, 2024

Btw, Is there any community discord or anything for this project/solana open source in general?

@lorisleiva
Copy link
Member

Btw, Is there any community discord or anything for this project/solana open source in general?

We didn't have a dedicated place for these sort of conversations (more like dozens of small Telegram groups haha) but we do now! We added a channel directly under the "Dev Tooling" section of the "Solana Tech" server on Discord. Here's the link.

https://discord.com/channels/428295358100013066/1295768706806321264

@4lve
Copy link
Author

4lve commented Oct 15, 2024

Cool!

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

Successfully merging this pull request may close these issues.

2 participants