algolia / algolia/docsearch

[sidepanel-js] ESM bundle crashes on Safari 14 because RegExp lookbehind detection is pre-evaluated

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

Description

## Description

Importing `@docsearch/sidepanel-js` causes the entire application to fail during module evaluation on Safari 14.1.2.

Safari reports:

```text
SyntaxError: Invalid regular expression: invalid group specifier name

RegExp
getRegex
(module code)
moduleEvaluation

Contributor guide

Open the contributing guide

Research direction

Reproduce the import failure for @docsearch/sidepanel-js on Safari 14.1.2, then trace getRegex during ESM module evaluation to find where lookbehind detection is pre-evaluated. Done means importing the bundle no longer throws Safari's invalid regular expression error while preserving lookbehind detection in supported environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.