unicode characters
smhg opened this issue · comments
tinyify using minify-stream 1.2.0 (which switched to terser) causes my build to explode when there are unicode characters in the source files.
This did not happen with uglify-es (in minify-stream <= 1.1.0).
Can this be connected to setting the ascii_only
flag in tinyify?
I'll try to dig further by feeding it straight into terser.
i've heard other people having problems in the choojs IRC too. are you seeing a similar issue to the JSON error here? i thought that might be related to source maps since that is the only place (AFAIK) that would use JSON.parse.
Yes, you're absolutely right. That's the error (due to the inline sourcemap with browserify's -d
flag). I'm sorry for filing this half-assed report.
I'm having a hard time running terser with the same (nested) options from the CLI. I'll try using the API next.
< goto-bus-stop> https://github.com/fabiosantoscode/terser/commit/ae6f08ba294e2785aaf5ff9d4be4dd857fede147 i think that's the issue
< goto-bus-stop> previously to_ascii converted to utf8, not ascii
< goto-bus-stop> the last uglify-es release i s longer than 3 months ago
< goto-bus-stop> that patch causes source maps with unicode characters to be wrongly converted to ascii
Thanks for figuring this out! uglify's parameters are such chaos for the uninitiated.
A new terser version was released, doing npm updatee
should fix this!