Repository navigation
Remove TS types from exports when they come from node_modules - #2191
chandlerprall merged 4 commits into
Conversation
thompsongl
left a comment
There was a problem hiding this comment.
Built locally and output in es/ drag and drop still has export {} from 'react-beautiful-dnd';, but that seems harmless.
Local CRA-EUI project doesn't throw errors.
| // comes from a 3rd-party library | ||
| // best way to reliably check if this is | ||
| // a type or value is to require the | ||
| // library and check it's exports |
There was a problem hiding this comment.
Interesting. I didn't notice any increase in build time, but I'd expect this method to take longer, I guess.
There was a problem hiding this comment.
It only executes for export {} from '' statements, which we don't really do with node_modules libraries.
We've had |
…c#2191) * Remove TS types from exports when they come from node_modules * changelog * Remove debugger statement
Summary
Fixes #2185 by filtering out non-value exports from
node_modulesduring build/babel. I tested by:esdirectory before-and-after this change, only components/drag_and_drop/index.js had changesnpm packed version of EUI with these changesChecklist
- [ ] Checked in dark mode- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Props have proper autodocs- [ ] Added documentation examples- [ ] Checked for accessibility including keyboard-only and screenreader modes