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
202fcbff
Commit
202fcbff
authored
Mar 29, 2020
by
Guy Bedford
Committed by
Joe Haddad
Mar 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terser
parent
7194bfc6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
minify.ts
...build/webpack/plugins/terser-webpack-plugin/src/minify.ts
+1
-1
package.json
packages/next/package.json
+1
-1
taskfile.js
packages/next/taskfile.js
+8
-0
misc.d.ts
packages/next/types/misc.d.ts
+4
-0
No files found.
packages/next/build/webpack/plugins/terser-webpack-plugin/src/minify.ts
View file @
202fcbff
/* eslint-disable
/* eslint-disable
arrow-body-style
arrow-body-style
*/
*/
import
{
minify
as
terser
,
MinifyOptions
}
from
'terser'
import
{
minify
as
terser
,
MinifyOptions
}
from
'
next/dist/compiled/
terser'
const
IS_MODERN_OUTPUT
=
/
\.
module
\.
js$/
const
IS_MODERN_OUTPUT
=
/
\.
module
\.
js$/
...
...
packages/next/package.json
View file @
202fcbff
...
@@ -87,7 +87,6 @@
...
@@ -87,7 +87,6 @@
"sass-loader"
:
"8.0.2"
,
"sass-loader"
:
"8.0.2"
,
"style-loader"
:
"1.0.0"
,
"style-loader"
:
"1.0.0"
,
"styled-jsx"
:
"3.2.5"
,
"styled-jsx"
:
"3.2.5"
,
"terser"
:
"4.4.2"
,
"thread-loader"
:
"2.1.3"
,
"thread-loader"
:
"2.1.3"
,
"unfetch"
:
"4.1.0"
,
"unfetch"
:
"4.1.0"
,
"url"
:
"0.11.0"
,
"url"
:
"0.11.0"
,
...
@@ -196,6 +195,7 @@
...
@@ -196,6 +195,7 @@
"string-hash"
:
"1.1.3"
,
"string-hash"
:
"1.1.3"
,
"strip-ansi"
:
"5.2.0"
,
"strip-ansi"
:
"5.2.0"
,
"taskr"
:
"1.1.0"
,
"taskr"
:
"1.1.0"
,
"terser"
:
"4.4.2"
,
"text-table"
:
"0.2.0"
,
"text-table"
:
"0.2.0"
,
"typescript"
:
"3.7.3"
,
"typescript"
:
"3.7.3"
,
"unistore"
:
"3.4.1"
"unistore"
:
"3.4.1"
...
...
packages/next/taskfile.js
View file @
202fcbff
...
@@ -531,6 +531,13 @@ export async function ncc_strip_ansi(task, opts) {
...
@@ -531,6 +531,13 @@ export async function ncc_strip_ansi(task, opts) {
.
target
(
'dist/compiled/strip-ansi'
)
.
target
(
'dist/compiled/strip-ansi'
)
}
}
// eslint-disable-next-line camelcase
// eslint-disable-next-line camelcase
export
async
function
ncc_terser
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
relative
(
__dirname
,
require
.
resolve
(
'terser'
)))
.
ncc
({
packageName
:
'terser'
})
.
target
(
'dist/compiled/terser'
)
}
// eslint-disable-next-line camelcase
export
async
function
ncc_text_table
(
task
,
opts
)
{
export
async
function
ncc_text_table
(
task
,
opts
)
{
await
task
await
task
.
source
(
opts
.
src
||
relative
(
__dirname
,
require
.
resolve
(
'text-table'
)))
.
source
(
opts
.
src
||
relative
(
__dirname
,
require
.
resolve
(
'text-table'
)))
...
@@ -603,6 +610,7 @@ export async function precompile(task) {
...
@@ -603,6 +610,7 @@ export async function precompile(task) {
'ncc_source_map'
,
'ncc_source_map'
,
'ncc_string_hash'
,
'ncc_string_hash'
,
'ncc_strip_ansi'
,
'ncc_strip_ansi'
,
'ncc_terser'
,
'ncc_text_table'
,
'ncc_text_table'
,
'ncc_unistore'
,
'ncc_unistore'
,
])
])
...
...
packages/next/types/misc.d.ts
View file @
202fcbff
...
@@ -176,6 +176,10 @@ declare module 'next/dist/compiled/strip-ansi' {
...
@@ -176,6 +176,10 @@ declare module 'next/dist/compiled/strip-ansi' {
import
m
from
'strip-ansi'
import
m
from
'strip-ansi'
export
=
m
export
=
m
}
}
declare
module
'next/dist/compiled/terser'
{
import
m
from
'terser'
export
=
m
}
declare
module
'next/dist/compiled/text-table'
{
declare
module
'next/dist/compiled/text-table'
{
function
textTable
(
function
textTable
(
rows
:
Array
<
Array
<
{}
>>
,
rows
:
Array
<
Array
<
{}
>>
,
...
...
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