Distribute source code with Hilla packages


when I tried to open some Hilla packages, function declarations I end up in x.d.ts files. That’s not pratical for debugging.

Can you please distribute also original source code with the package for this purpose?


The source code is also available in the node_modules folder. IDEs generally navigate to the type definition, but you can find the JS files right next to them.

Generally, our React components are a wrapper of our web-components, so you would need to go to the @vaadin folder to find their implementation (in your example /node_modules/@vaadin/notification/src/vaadin-notification.js).


Is there a way how to force IDE to go to the source code instead? It would be a lot better experience.

Maybe delete x.d.ts files by some CLI command? I would love to see this solution in general.

You could use the [Right click]Go ToImplementation(s) option (Ctrl+Alt+B on Windows) to go to JS implementation. However, it won’t work for the declaration that cannot be mapped on the code (e.g., for React API, or for @vaadin/react-components).

Do you think this is something that could be solved by a plugin to the IDE?

Creating a plugin only for Hilla would make sense to me for several reasons. After all, it’s a very special solution.

Certainly, for your situation, we could distribute the unminified code, which would allow for direct mapping to the components’ code. I’ve created an issue in the components’ repository.

Regrettably, this solution won’t be applicable to other (non-Vaadin) packages that don’t provide their unaltered source code. It’s also unlikely that an IDEA plugin could rectify this, given the numerous assumptions it would need to make.

1 Like

Thanks! Let me know if I can help with something.

1 Like