opensanctions / opensanctions/poliloom

Re-enable Turbopack once ::highlight() pseudo-element support is added

Open
#79 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

gui
Dominant language
Python
Stars
22
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Context

We are currently using webpack instead of Turbopack (Next.js 16's default bundler) because Turbopack's CSS parser (LightningCSS) does not yet support the ::highlight() pseudo-element, which we use for text highlighting in archived pages.

Current Workaround

Added --webpack flag to build and dev scripts in package.json to use webpack instead of Turbopack.

"dev": "next dev --webpack",
"build": "next build --webpack"

When to Re-enable Turbopack

Once the following upstream issues are resolved:

  1. LightningCSS PR #970: Adds support for ::highlight() pseudo-element

  2. Next.js Issue #85398: Tracks the ::highlight() parsing error in Turbopack

Action Items

  • Monitor LightningCSS PR #970 for merge
  • Wait for Next.js to update its LightningCSS dependency
  • Test build with Turbopack (remove --webpack flags)
  • Remove webpack flags from package.json scripts once verified working

Related Code

  • CSS usage: src/app/globals.css (line 50)
  • Runtime usage: src/lib/textHighlighter.ts
  • Injected styles: src/app/api/archived-pages/[id]/html/route.ts

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the package.json dev and build scripts, then review the ::highlight() usage in src/app/globals.css, src/lib/textHighlighter.ts, and the archived-pages route. Check LightningCSS PR #970 and Next.js issue #85398 before testing without the --webpack flags. Done means Turbopack builds and runs successfully and the flags can be removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript, next.js
Domain
build-system, frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.