Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
9b70236b
Unverified
Commit
9b70236b
authored
Mar 03, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Mar 03, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[devtools] Bundle for same target as Next.js browser runtime (#90762)
parent
6f763ecf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
next-devtools.webpack-config.js
packages/next/next-devtools.webpack-config.js
+4
-0
magic-identifier.ts
packages/next/src/shared/lib/magic-identifier.ts
+3
-3
No files found.
packages/next/next-devtools.webpack-config.js
View file @
9b70236b
...
@@ -73,7 +73,11 @@ module.exports = ({ dev, ...rest }) => {
...
@@ -73,7 +73,11 @@ module.exports = ({ dev, ...rest }) => {
test
:
/
\.(
ts|tsx
)
$/
,
test
:
/
\.(
ts|tsx
)
$/
,
exclude
:
[
/node_modules/
],
exclude
:
[
/node_modules/
],
loader
:
'builtin:swc-loader'
,
loader
:
'builtin:swc-loader'
,
/** @type {import('@rspack/core').SwcLoaderOptions} */
options
:
{
options
:
{
env
:
{
targets
:
MODERN_BROWSERSLIST_TARGET
,
},
jsc
:
{
jsc
:
{
parser
:
{
parser
:
{
syntax
:
'typescript'
,
syntax
:
'typescript'
,
...
...
packages/next/src/shared/lib/magic-identifier.ts
View file @
9b70236b
...
@@ -122,10 +122,10 @@ export function deobfuscateModuleId(moduleId: string): string {
...
@@ -122,10 +122,10 @@ export function deobfuscateModuleId(moduleId: string): string {
*/
*/
export
function
removeFreeCallWrapper
(
text
:
string
):
string
{
export
function
removeFreeCallWrapper
(
text
:
string
):
string
{
// Match (0, <ident>.<ident>) patterns anywhere in the text the beginning
// Match (0, <ident>.<ident>) patterns anywhere in the text the beginning
//
Use Unicode property escapes (\p{ID_Start}, \p{ID_Continue}) for full JS identifier support
//
Overzealous: accept any non-whitespace member expression after the dot.
//
Requires the 'u' (unicode) flag in the regex
//
TODO: Fix https://linear.app/vercel/issue/NEXT-4875 to allow using unicode property escapes
return
text
.
replace
(
return
text
.
replace
(
/
\(
0
\s
*,
\s
*
(
__TURBOPACK__
[
a-zA-Z0-9_$
]
+__
\.[
\p
{ID_Start}_$
][\p
{ID_Continue}$
]
*
)\)
/
u
,
/
\(
0
\s
*,
\s
*
(
__TURBOPACK__
[
a-zA-Z0-9_$
]
+__
\.[
^\s
)
]
+
)\)
/g
,
'$1'
'$1'
)
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment