When I try to import certain ES6 files (such as .js, .jsx, .ts, .tsx) using the syntax import ComponentName from './folder/ComponentName'; (without extension), they end up resolving as undefined. This occurs even though there are no errors from Webpack or Typescript, and the files resolve correctly when the extension is added. Strangely, other files are able to resolve properly with or without the extension. What could be causing this inconsistency?
This issue tends to occur more frequently with React components, but it can happen regardless of the content of the imported file or whether it has a default export.