VSCodeMinify icon indicating copy to clipboard operation
VSCodeMinify copied to clipboard

Minify resulting in file with "undefined"

Open rfossella opened this issue 5 years ago • 3 comments

Hi, Been using this extension in vscode for more than a year. Recent vscode update v1.32.3 has seemingly caused my js minifications to yield file with simply "undefined" as its contents.

Thought it might be a syntax issue but it happens even w/single line of code in a file.

Any ideas what might be causing this?

My settings have always been like this:

"minify.js": {
		"mangle": true,
		"compress": {
		  "sequences": true,
		  "properties": true,
		  "dead_code": true,
		  "drop_debugger": true,
		  "unsafe": false,
		  "unsafe_comps": false,
		  "conditionals": true,
		  "comparisons": true,
		  "evaluate": true,
		  "booleans": true,
		  "loops": true,
		  "unused": true,
		  "hoist_funs": true,
		  "keep_fargs": true,
		  "keep_fnames": false,
		  "hoist_vars": false,
		  "if_return": true,
		  "join_vars": true,
		  "collapse_vars": false,
		  "reduce_vars": false,
		  "cascade": true,
		  "side_effects": true,
		  "pure_getters": false,
		  "pure_funcs": null,
		  "negate_iife": false,
		  "drop_console": false,
		  "passes": 1,
		  "global_defs": {}
		},
		"output": {
		  "ascii_only": false,
		  "inline_script": false,
		  "max_line_len": 32000,
		  "bracketize": false,
		  "semicolons": true,
		  "comments": false,
		  "shebang": true,
		  "preamble": null,
		  "quote_style": "best"
		}
	  },

rfossella avatar Mar 27 '19 06:03 rfossella

compress.cascade is no longer supported and output.bracketize has been replaced by output.braces. There's code in the extension to handle this, but I dropped the e out of bracketize, so it would continue through and be flagged as an 'unsupported option', thus failing to compress. Pushing a new version now.

HookyQR avatar Mar 27 '19 08:03 HookyQR

Has this been updated in VSCODE? Is there something I need to do? Still see undefined. Thanks so much!

rfossella avatar Mar 27 '19 20:03 rfossella

Should be fixed now. There's a second update required. (oops)

HookyQR avatar Mar 30 '19 00:03 HookyQR