What does "bagwig" mean?

Bagwig: A wig, in use in the 18th century, with the hair at the back of the head in a bag.

Sources