algolia / algolia/docsearch

Chrome: DevTools failed to load source map

Open
#1,534 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.4k
Forks
439
Avg merge
14h 32m
Merged PRs (30d)
19

Description

## Description

Following the [installation without package-manager](https://docsearch.algolia.com/docs/DocSearch-v3#without-package-manager) and running the Website in Chrome, throws the following warning in console:

`DevTools failed to load source map: Could not load content for https://cdn.jsdelivr.net/npm/@docsearch/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE`

When including the full URL to `index.js` instead, the sourcemap is loaded without warnings:
```js

```

## Steps to reproduce

Since on codesandbox there are tons of errors in the console, I used jsfiddle for an example (less errors):

1. With Chrome, go to [https://jsfiddle.net/jrson83/9gcqdxah/4/](https://jsfiddle.net/jrson83/9gcqdxah/4/)
2. Open Chrome dev tools
3. Refresh the page
4. See warning

**Live reproduction:**

- JavaScript [https://jsfiddle.net/jrson83/9gcqdxah/4/](https://jsfiddle.net/jrson83/9gcqdxah/4/)

## Expected behavior

- Sourcemap gets resolved without console warning.

## Environment

- OS: Windows 11
- Browser: Chrome &Chrome Canary
- DocSearch version: 3.2.1

Contributor guide

Open the contributing guide

Research direction

Start with the package-manager-free installation described in the issue and compare its @docsearch/js 3.2.1 index.js URL with the full dist/umd/index.js URL. Reproduce the warning in Chrome using the linked JSFiddle, then verify that the published script resolves its source map without a console warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.