-
Notifications
You must be signed in to change notification settings - Fork 1
Re-enable Turbopack once ::highlight() pseudo-element support is added #79
Copy link
Copy link
Open
Labels
guiGUI/interface related issuesGUI/interface related issues
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:
-
LightningCSS PR #970: Adds support for
::highlight()pseudo-element- Add support for
::highlightparcel-bundler/lightningcss#970 - Status: Pending review (as of Oct 2025)
- Add support for
-
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
--webpackflags) - 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
guiGUI/interface related issuesGUI/interface related issues