Police officers have seized hundreds of plants being grown for the production of the Class B drug in Batley town centre on Friday night.
West Yorkshire Police said officers were responding to reports of a burglary at a business premises when they happened across the farm.
A spokesman for the force's Batley & Spen neighbourhood policing team said: "On the evening of Friday 28th February, officers from NPT Team 2 responded to a report of an ongoing burglary at a business premises near to Batley town centre.
Two teenagers in hospital after crashed motorbike sets on fire on Leeds street
Leeds Olympian Nicola Adams and girlfriend Ella Baig reveal baby boy's name as they talk about parenthood
Caught on camera Leeds: West Yorkshire Police need to speak to these people urgently
Met Office storm warning for Leeds - when the stormy weather is due to hit and how long it will last
How to see Lancaster bomber and Spitfire flypasts near Leeds at Yorkshire Wartime Village
"Upon arrival, officers discovered a sophisticated, and high value cannabis 'farm'.
"A team of officers spent the entire day removing plants and equipment used for the cultivation of the cannabis plants."