I have a React application which is written in ES6/JSX and transpiled by the Webpack. Part of this application I want to extract into a separate repository (github) and include as a dependency in package.json.
What I do not understand is if I need to create /dist directory with ES5 compiled version of that dependency before pushing it to github.
I thought in case I use Webpack for building the main application my dependency can also be written in ES6 without additional transpyling to ES5. And when I import something from that dependency it's included and transpiled in the main build. Am I right?