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

Rename generated/Button to something else than Button #252

Open
Artur- opened this issue Jul 2, 2024 · 2 comments
Open

Rename generated/Button to something else than Button #252

Artur- opened this issue Jul 2, 2024 · 2 comments
Assignees

Comments

@Artur-
Copy link
Member

Artur- commented Jul 2, 2024

IntelliJ sometimes suggests importing it instead of the real Button

image
@rolfsmeds
Copy link

Would be nice to know why the generated Button specifically gets suggested, but not other generated components. (Seems like the same problem should affect others as well.)

If we can't resolve it otherwise, renaming it should be unproblematic I suppose.

@web-padawan
Copy link
Member

It's worth noting that for most of components, we just re-export from generated folder e.g. like this:

export * from './generated/Button.js';

I guess we could adjust the build scripts to add Generated prefix and update src files accordingly.
This would probably require us to list what we re-export explicitly e.g. this way:

export { ButtonElement, GeneratedButton as Button } from './generated/Button.js'; 
export type { ButtonEventMap, ButtonProps } from './generated/Button.js'; 

@sissbruecker sissbruecker self-assigned this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants