A method of producing a prefabricated component for buildings comprising the following steps: -) filling a curable casting material into a formwork for forming a substantially plate-shaped base element, -) connecting the base element to a plurality of lightweight component units such as thermal insulation panels, either by inserting the lightweight component units into the casting material not yet completely cured or by means of connecting elements which connect the base element and lightweight component units to one another, wherein the method is characterised by the following steps: -) seamlessly lining up of the lightweight component units, whereby a plate-shaped lightweight construction layer is created which projects beyond the base element at all lateral edges by at least one machining section, -) measuring at the factory of the finished cured prefabricated component comprising the base element and the lightweight construction layer with respect to a reference provided at the factory for determining the production-related deviations of the measured values from a tolerance range predetermined by the factory reference for the subsequent assembly at the construction site, and -) dimensionally accurate machining at the factory of the machining sections at the edge as well as the side surface of the lightweight construction layer facing away from the base element by removing material of the lightweight construction layer to the extent of the deviations from the tolerance range determined in the previous step. -) filling a curable casting material into a formwork for forming a substantially plate-shaped base element, -) connecting the base element to a plurality of lightweight component units such as thermal insulation panels, either by inserting the lightweight component units into the casting material not yet completely cured or by means of connecting elements which connect the base element and lightweight component units to one another, wherein the method is characterised by the following steps: -) seamlessly lining up of the lightweight component units, whereby a plate-shaped lightweight construction layer is created which projects beyond the base element at all lateral edges by at least one machining section, -) measuring at the factory of the finished cured prefabricated component comprising the base element and the lightweight construction layer with respect to a reference provided at the factory for determining the production-related deviations of the measured values from a tolerance range predetermined by the factory reference for the subsequent assembly at the construction site, and -) dimensionally accurate machining at the factory of the machining sections at the edge as well as the side surface of the lightweight construction layer facing away from the base element by removing material of the lightweight construction layer to the extent of the deviations from the tolerance range determined in the previous step. -) seamlessly lining up of the lightweight component units, whereby a plate-shaped lightweight construction layer is created which projects beyond the base element at all lateral edges by at least one machining section, -) measuring at the factory of the finished cured prefabricated component comprising the base element and the lightweight construction layer with respect to a reference provided at the factory for determining the production-related deviations of the measured values from a tolerance range predetermined by the factory reference for the subsequent assembly at the construction site, and -) dimensionally accurate machining at the factory of the machining sections at the edge as well as the side surface of the lightweight construction layer facing away from the base element by removing material of the lightweight construction layer to the extent of the deviations from the tolerance range determined in the previous step.