Hi, I've been using WebStorm for a long time. Clicking on the browser popup inside my index.html is such a part of my muscle memory right now, and I love it.
The problem is that for my current workflow, WebStorm's built in server isn't cutting it. The reason is that while ES6 module importing works great, the community (the Web Components one at least) is using bare module imports. For example, while
works today, most are using
And then for components as part of the same project, folks will typically leave off the .js file extension.
This doesn't work with a typical file server like WebStorm provides. From what I can see there are 3 potential solutions:
- Import maps - this has nothing to do with WebStorm and is likely the best solution, but is Chrome only right now, and maybe shouldn't be part of your project anyway, as I intend to bundle when going to prod anyway
- Use a different server. https://www.npmjs.com/package/es-dev-server seems to be the defacto standard right now for Web Component development. The easiest sounding thing to do is to replace WebStorm's server with this one, but I don't know that its possible. Starting up the server in the terminal is fine, but again, I have years of muscle memory clicking on the browser icon from the html file editor, and not worrying about the extra step of starting a server. Is this possible to swap in a different server somehow?
- Add functionality to the existing WebStorm server for bare module imports. This seems most likely as something achievable now, but I don't know if this exists as a possibility either.
Hopefully someone can advise!