Is This Safe?
Yes and no. Many discourage the mixing of purebreds. It does not help toward breeders' goals of maintaining integrity and improving the bloodlines of either purebred.
Breeding and subsequent pregnancy
can pose risks. If a Chihuahua is chosen as the dam, with a Pug being the sire, the puppies will have larger heads (due to Pug genes) than otherwise. The breed is already prone to needing C-sections and this sort of crossing only increases the chances of that.
While a breeder can in fact breed a Chihuahua with a Pug to produce what the public knows as a Miniature Pugs, there are others who claim to have "Pocket Pugs"
Some breeders will take 2 runt Pug dogs (dogs that are the smallest of their litter) and then breed them together, hoping to produce smaller than nature intended dogs, and will dub them teacups.
When you take two tiny dogs, that are smaller than the breed standard, these dogs may require more care. Bones may be more fragile, there may be issues with hypoglycemia, etc. To pair two tiny Pugs will only serve to produce more Pug puppies that are too small and with more potential health issues
Others will falsify the pup's age so that one will believe that they are receiving a small Pug when that dog is actually younger than the papers show. As you can imagine, this is highly unethical and is very dangerous for the pup's health.