Distributing React components
While I was open sourcing react-place I noticed that there is some complexity around preparing the component for releasing. I decided to document the process here so I have a solid resource next time. You may be surprised but writing the working
jsx file doesn’t mean that the component is ready for publishing and is usable for other developers.
Using Mocha with ES6 spec files
Replacing code for production with Babel transformation
Transpile to ES modules with Babel
While I was working on Navigo an issue popped out. It was about using the library in the context of Web Dev Server where we have everything in TypeScript. And something was not ok with Navigo. The npm package wasn't exported properly and we were keep getting a
does not provide an export named 'default' error. It turned out the problem is that Navigo is not exported properly as ES module (also known as ESM).