M
M
Maxim Sofronov2015-11-05 00:38:32
css
Maxim Sofronov, 2015-11-05 00:38:32

How to prevent UglifyJS from minifying part of a string?

I use Prepros. It has an UglifyJS minify function.
In the js code that is minified, there is an IE definition line /*@cc_on + @_jscript_version @*/.
Question: How can I configure UglifyJS so that it doesn't remove this line?
I assume that UglifyJS considers this line as a comment and removes it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Idel Gizatullin, 2015-11-05
@idelg

It's better to use UglifyJS2 . He himself understands that you cannot delete "@license" or "@cc_on".

A
Alexander Taratin, 2015-11-05
@Taraflex

there is an IE definition string

Wah... 2015...
Graceful Degradation also applies to scripts.
Use functions from https://modernizr.com/ to crutch old browsers.

S
Sergey, 2015-11-05
Protko @Fesor

https://github.com/mishoo/UglifyJS2#keeping-copyri...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question