I am attaching select2 to my other javascript files, for example:
cat scripts/jquery-timeago.js scripts/jquery-autosize.js scripts/select2.js > public/vendors.js
uglifyjs -nc -o public/vendors.min.js public/vendors.js
However, I found a problem where before there select2would be an empty space character before select2only after concatenation, which then causes a parsing error in UglifyJS. If I go to the beginning, where it select2starts in the combined file and presses backspace, the empty character is deleted and minimization works fine.
What's happening? How can i fix this?
source
share