Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8361197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:38:44+00:00 2026-06-09T11:38:44+00:00

I am concatenting select2 to my other javascript files like so: cat scripts/jquery-timeago.js scripts/jquery-autosize.js

  • 0

I am concatenting select2 to my other javascript files like so:

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 an issue where there would be an empty whitespace character prepended right before select2 only after concatenation, which then causes a parsing error in UglifyJS. If I go to the beginning of where select2 starts in the concatenated file and press backspace, an empty character is deleted and minification works fine.

What is going on? How can I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:38:46+00:00Added an answer on June 9, 2026 at 11:38 am

    Just opened issue #306 on this at select2 github repo.

    select2.js is saved with UTF8 with BOM encoding. When select2.js is concatenated with other files and passed to uglifyjs, uglifyjs breaks when it comes to BOM bytes.

    To fix this simply save file in UTF8 encoding (without BOM).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone successfully tried minifying AND concatenating all the jqGrid locale files so that
I'm using javascript to duplicate a couple select lists and append them to another
I need a some stored procedure that called like: search('foo bar') makes a search
Can something like this be done with a select statement: SELECT col1, concat(col2 +
I am concatenating video files of mpg format using the 'Copy' command in command
What's the best way of concatenating binary files using Powershell? I'd prefer a one-liner
Total noob, having trouble using a variable to loop through row. I'd like to
I'm struggling with some JavaScript code that I have used countless times across my
I have rows in a contact details database that look like this: contactID -
I would like to create a SP or UDF where I supply a table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.