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
48140d5b
Unverified
Commit
48140d5b
authored
May 05, 2020
by
Joe Haddad
Committed by
GitHub
May 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable Comment Extraction (#12496)
parent
f0248140
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
webpack-config.ts
packages/next/build/webpack-config.ts
+1
-0
index.js
...ntegration/build-output/fixtures/basic-app/pages/index.js
+1
-0
index.test.js
test/integration/build-output/test/index.test.js
+9
-0
No files found.
packages/next/build/webpack-config.ts
View file @
48140d5b
...
@@ -640,6 +640,7 @@ export default async function getBaseWebpackConfig(
...
@@ -640,6 +640,7 @@ export default async function getBaseWebpackConfig(
minimizer
:
[
minimizer
:
[
// Minify JavaScript
// Minify JavaScript
new
TerserPlugin
({
new
TerserPlugin
({
extractComments
:
false
,
cache
:
path
.
join
(
distDir
,
'cache'
,
'next-minifier'
),
cache
:
path
.
join
(
distDir
,
'cache'
,
'next-minifier'
),
parallel
:
config
.
experimental
.
cpus
||
true
,
parallel
:
config
.
experimental
.
cpus
||
true
,
terserOptions
,
terserOptions
,
...
...
test/integration/build-output/fixtures/basic-app/pages/index.js
View file @
48140d5b
/*! DO NOT EXTRACT ME */
export
default
function
()
{
export
default
function
()
{
return
<
div
/>
return
<
div
/>
}
}
test/integration/build-output/test/index.test.js
View file @
48140d5b
...
@@ -4,6 +4,7 @@ import 'flat-map-polyfill'
...
@@ -4,6 +4,7 @@ import 'flat-map-polyfill'
import
{
remove
}
from
'fs-extra'
import
{
remove
}
from
'fs-extra'
import
{
nextBuild
}
from
'next-test-utils'
import
{
nextBuild
}
from
'next-test-utils'
import
{
join
}
from
'path'
import
{
join
}
from
'path'
import
{
recursiveReadDir
}
from
'next/dist/lib/recursive-readdir'
jasmine
.
DEFAULT_TIMEOUT_INTERVAL
=
1000
*
60
*
2
jasmine
.
DEFAULT_TIMEOUT_INTERVAL
=
1000
*
60
*
2
...
@@ -34,6 +35,14 @@ describe('Build Output', () => {
...
@@ -34,6 +35,14 @@ describe('Build Output', () => {
expect
(
stdout
).
toContain
(
'○ /'
)
expect
(
stdout
).
toContain
(
'○ /'
)
})
})
it
(
'should not emit extracted comments'
,
async
()
=>
{
const
files
=
await
recursiveReadDir
(
join
(
appDir
,
'.next'
),
/
\.
txt|
\.
LICENSE
\.
/
)
expect
(
files
).
toEqual
([])
})
})
})
describe
(
'Custom App Output'
,
()
=>
{
describe
(
'Custom App Output'
,
()
=>
{
...
...
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