I've come into an argument with my co-workers for which we can't seem to find an answer from any official source (MDN, webpack documentation, ...). My research hasn't yielded much either. There seems to be doubt even when it comes to importing as well.
Our setup is Webpack, Babel, and a typical React / Redux app. Take this example:
export * from './actions';
export * from './selectors';
export * from './reducer';
export { default } from './reducer';
This allows me to separate a Redux module into logical sections, making the code easier to read and maintain.
However, it is believed by some of my co-workers that export * from
may, in fact, harm webpack
's tree-shaking capabilities, by tricking it into believing an export is used when it is in fact just being re-exported.
So my question is, are there any facts proving or disproving this?