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
5e965bc9
Unverified
Commit
5e965bc9
authored
Nov 11, 2022
by
Donny/강동윤
Committed by
GitHub
Nov 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Fix regression of swc minifier (#42790)
- Closes
https://github.com/vercel/next.js/issues/42782
parent
f5031a48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
minify.rs
packages/next-swc/crates/napi/src/minify.rs
+2
-15
No files found.
packages/next-swc/crates/napi/src/minify.rs
View file @
5e965bc9
...
@@ -31,9 +31,8 @@ use fxhash::FxHashMap;
...
@@ -31,9 +31,8 @@ use fxhash::FxHashMap;
use
napi
::
bindgen_prelude
::
*
;
use
napi
::
bindgen_prelude
::
*
;
use
serde
::
Deserialize
;
use
serde
::
Deserialize
;
use
swc_core
::{
use
swc_core
::{
base
::{
config
::
JsMinifyOptions
,
try_with_handler
,
BoolOrDataConfig
,
TransformOutput
},
base
::{
try_with_handler
,
TransformOutput
},
common
::{
errors
::
ColorConfig
,
sync
::
Lrc
,
FileName
,
SourceFile
,
SourceMap
,
GLOBALS
},
common
::{
errors
::
ColorConfig
,
sync
::
Lrc
,
FileName
,
SourceFile
,
SourceMap
,
GLOBALS
},
ecma
::
minifier
::
option
::
terser
::
TerserCompressorOptions
,
};
};
use
crate
::{
get_compiler
,
util
::
MapErr
};
use
crate
::{
get_compiler
,
util
::
MapErr
};
...
@@ -89,19 +88,7 @@ impl Task for MinifyTask {
...
@@ -89,19 +88,7 @@ impl Task for MinifyTask {
GLOBALS
.set
(
&
Default
::
default
(),
||
{
GLOBALS
.set
(
&
Default
::
default
(),
||
{
let
fm
=
self
.code
.to_file
(
self
.c.cm
.clone
());
let
fm
=
self
.code
.to_file
(
self
.c.cm
.clone
());
self
.c
.minify
(
self
.c
.minify
(
fm
,
handler
,
&
self
.opts
)
fm
,
handler
,
&
JsMinifyOptions
{
compress
:
TerserCompressorOptions
{
// inline: TerserInlineOption::Num(0).into(),
..
Default
::
default
()
}
.into
(),
mangle
:
BoolOrDataConfig
::
from_bool
(
false
),
..
self
.opts
.clone
()
},
)
})
})
},
},
)
)
...
...
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