File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ fn minify_all(files: &[PathBuf]) {
92
92
let unresolved_mark = Mark :: new ( ) ;
93
93
let top_level_mark = Mark :: new ( ) ;
94
94
95
- let program = parse_file_as_module (
95
+ let Ok ( program) = parse_file_as_module (
96
96
& fm,
97
97
Default :: default ( ) ,
98
98
Default :: default ( ) ,
@@ -104,8 +104,9 @@ fn minify_all(files: &[PathBuf]) {
104
104
} )
105
105
. map ( Program :: Module )
106
106
. map ( |module| module. apply ( & mut resolver ( unresolved_mark, top_level_mark, false ) ) )
107
- . map ( |module| module. apply ( & mut paren_remover ( None ) ) )
108
- . unwrap ( ) ;
107
+ . map ( |module| module. apply ( & mut paren_remover ( None ) ) ) else {
108
+ return Ok ( ( ) ) ;
109
+ } ;
109
110
110
111
let output = optimize (
111
112
program,
Original file line number Diff line number Diff line change @@ -16,5 +16,5 @@ rm -rf .next
16
16
# This is not useful data, as this is a script used only by me (@kdy1)
17
17
npx next telemetry disable
18
18
19
- npm run build | node " $SCRIPT_DIR /evaluate.js"
19
+ npx next build | node " $SCRIPT_DIR /evaluate.js"
20
20
touch " $SCRIPT_DIR /../../tests/compress.rs"
You can’t perform that action at this time.
0 commit comments