Trick-or-treating has been a Halloween custom since the 1940s. Much has changed around the candy-hunt of the 31st of October, including the candy itself.

But one sugary treat that’s been a Halloween constant are the small, circular, fruit-flavoured pills called Rockets. They are made in Newmarket today, but share a unique history with a west-end Toronto neighbourhood.

In the 1940s, a British candy maker named Edward Dee immigrated to New Jersey. He opened his first candy factory in Bloomfield, N.J., in 1949.

He decided to expand his production into Toronto in 1963. So he started to make Rockets in a factory on Queen Street West. High-end condominiums stand on the site of the factory today, appropriately named the Candy Factory Lofts.

The company sold the building in 1988 and moved their production to Newmarket where they are still made today.

CBC Radio's Here and Now food columnist Sarah Elton interviewed Edward Dee's granddaughter, Liz, who still works with the company.

Originally titled Ce De Candy, Inc, the company changed its name to Smarties Inc. in 2011. In the United States, Rockets are known primarily as Smarties. They are called Rockets in Canada so as not to confuse them with the candy-coated chocolate Smarties made by Nestle.

Today the company is headquartered in Union, N.J., not far from where Dee first landed in the '40s, making it an American family-owned company.

The original Rocket prototype was invented in England. But it would have been flavoured with cinnamon and cloves. Those were spices that were likely imported into Britain from the British colonies.

After the First World War, the family bought gunpowder pellet machines and repurposed them to make the Rockets.

These pellet machines that were used to make Rockets would’ve made bullets compressing gunpowder in the same way.

The candy as we know it today was shaped by world events in the 1970s when sugar prices spiked. This was a period of inflation — there was the oil crisis, inflation and economic malaise. Sugar had been a part of a supply management program in the United States.

So in the early 1970s when people ate more sugar than was produced, prices went up and candy makers, like the Dees, switched from cane or beet sugar to Dextrose sugar. That's a sugar made from corn.

At the time, factories used to be economic anchors in this city, and the Dee’s candy factory was no different. It helped shape the neighbourhood around Queen Street West and Shaw Street.

According to Edward Dee, who is now 88 years old and still working in the business in New Jersey, the workers came mostly from what was a Portuguese neighbourhood around the factory. When the factory moved to Newmarket, these people didn't leave the area and follow their jobs. Other confection-producing factories were open in the neighbourhood at that time — Dee remembers Mars and M&Ms — and there is still a Nestle candy factory nearby.

Today, Rockets are produced 24 hours a day in Newmarket and the factory estimates billions of packets of the candies are made every year.