You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using @coveo/headless in a Create React App project, multiple source map parsing errors appear in the console during development. These errors come from two dependencies:
@microsoft/fetch-event-source
exponential-backoff
Impact
While these errors don't affect functionality, they:
Clutter the development console
Make it harder to spot actual issues
May confuse developers new to the library
Proposed Solutions
Option 1: Bundle Dependencies (Recommended)
Bundle @microsoft/fetch-event-source and exponential-backoff into the main package output instead of keeping them as external dependencies. This would involve:
Failed to parse source map from '.../node_modules/@microsoft/fetch-event-source/src/fetch.ts'
Failed to parse source map from '.../node_modules/@microsoft/fetch-event-source/src/parse.ts'
Failed to parse source map from '.../node_modules/exponential-backoff/src/backoff.ts'
Failed to parse source map from '.../node_modules/exponential-backoff/src/delay/always/always.delay.ts'
[...additional similar errors...]
Relevant log output
The text was updated successfully, but these errors were encountered:
We will stop bundling Headless altogether on our NPM output. Indeed, regardless, those who consume Headless through NPM already need to run a bundler of their own on this project, and double bundling almost always has a detrimental effect on bundle size, as it prevents code deduplication.
We will include as production dependencies everything being used by Headless outputted code & sourcemaps.
That's our plan; we will validate whether it can be applied in the coming weeks without breaking changes.
If those changes are breaking, we will fix try to find alleviating solutions, but we also may fix this behaviour only on our next major release.
Which product are you using?
Headless
product version
3.13.2
bug description
Source Map Errors from Dependencies
Description
When using @coveo/headless in a Create React App project, multiple source map parsing errors appear in the console during development. These errors come from two dependencies:
Impact
While these errors don't affect functionality, they:
Proposed Solutions
Option 1: Bundle Dependencies (Recommended)
Bundle
@microsoft/fetch-event-source
andexponential-backoff
into the main package output instead of keeping them as external dependencies. This would involve:Option 2: Fix Source Map Generation
If keeping these as external dependencies is preferred:
Workarounds for Users
Until this is fixed, users can:
Environment
Let me know if you need any additional information or clarification.
Steps to reproduce
Reproduction Steps
npx create-react-app repro cd repro
npm start
Error Output
Relevant log output
The text was updated successfully, but these errors were encountered: