-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Labels
CSSRelated to CSS.Related to CSS.TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.locked
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/lingering-bash-hz2dgk?workspaceId=ws_MuNQxfRHg6TpeC7ZYcnAEX
To Reproduce
- (see CodeSandbox) Import any local CSS file with a
::target-textselector - (see CodeSandbox) In
package.json, set"dev": "next dev --turbopack" - Run a development server using
npm run dev - Visit http://localhost:3000, and notice the error about
::target-textnot being recognized:

- If you would remove
--turbopackfrom thepackage.json, it would succesfully build and function:

Current vs. Expected behavior
See the screenshots above. I expect turbopack to result in supporting the same functionality as the version without turbopack would, so that the ::target-text pseudo-element is recognized. When I click on the anchor tag in a browser that supports Scroll To Text Fragment (such as Chrome) I expect to see the paragraph text receive a red background as defined by the style.
Provide environment information
See CodeSandboxWhich area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
Metadata
Metadata
Assignees
Labels
CSSRelated to CSS.Related to CSS.TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.locked