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
899f21ff
Unverified
Commit
899f21ff
authored
Apr 04, 2019
by
Connor Davis
Committed by
GitHub
Apr 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont prefetch with debug mode (#6895)
parent
8e51c78e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
router.ts
packages/next-server/lib/router/router.ts
+1
-1
webpack-config.ts
packages/next/build/webpack-config.ts
+1
-0
No files found.
packages/next-server/lib/router/router.ts
View file @
899f21ff
...
@@ -431,7 +431,7 @@ export default class Router implements IRouterInterface {
...
@@ -431,7 +431,7 @@ export default class Router implements IRouterInterface {
prefetch
(
url
:
string
):
Promise
<
void
>
{
prefetch
(
url
:
string
):
Promise
<
void
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// Prefetch is not supported in development mode because it would trigger on-demand-entries
// Prefetch is not supported in development mode because it would trigger on-demand-entries
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
return
if
(
process
.
env
.
NODE_ENV
!==
'production'
||
process
.
env
.
__NEXT_EXPERIMENTAL_DEBUG
)
return
const
{
pathname
}
=
parse
(
url
)
const
{
pathname
}
=
parse
(
url
)
// @ts-ignore pathname is always defined
// @ts-ignore pathname is always defined
...
...
packages/next/build/webpack-config.ts
View file @
899f21ff
...
@@ -267,6 +267,7 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug =
...
@@ -267,6 +267,7 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug =
...(
dev
&&
!
isServer
?
{
...(
dev
&&
!
isServer
?
{
'process.env.__NEXT_DIST_DIR'
:
JSON
.
stringify
(
distDir
)
'process.env.__NEXT_DIST_DIR'
:
JSON
.
stringify
(
distDir
)
}
:
{}),
}
:
{}),
'process.env.__NEXT_EXPERIMENTAL_DEBUG'
:
JSON
.
stringify
(
debug
),
'process.env.__NEXT_EXPORT_TRAILING_SLASH'
:
JSON
.
stringify
(
config
.
experimental
.
exportTrailingSlash
)
'process.env.__NEXT_EXPORT_TRAILING_SLASH'
:
JSON
.
stringify
(
config
.
experimental
.
exportTrailingSlash
)
}),
}),
!
isServer
&&
new
ReactLoadablePlugin
({
!
isServer
&&
new
ReactLoadablePlugin
({
...
...
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