From the Wikipedia Star Trek Replicator Article:
Replicator technology, even if produced on a larger scale, cannot be used to create complex objects such as shuttlecraft or starships (the production staff felt that being able to replicate entire starships "at the push of a button" would severely impact dramatic potential). However, in the Star Trek: Deep Space Nine episode "For the Cause", industrial replicators are used to replicate large components of ships, shuttlecraft, and other pieces of this sort, which are later used in shipyards to construct such vessels. In this manner, as few as 15 industrial replicators are enough to replicate the components needed to build a fleet of starships or to help a civilization recover from a planet-wide natural disaster.
The explication given for this, from this question:
With regards whole ship replication, there are notes in the Next Generation Technical Manual. It states that replication of an entire ship would take too many resources/too much energy.
So, replicating a whole starship in components is no problem but replicating a whole ship in an instant drains on the energy/resources? That makes no sense unless the energy drain to create bigger objects is exponential? Has such a thing ever been stated or given an explanation why it is possible to replicate the whole ship as components but not in a single replication?
Also, the energy issue would only be a "temporary" problem until they find a better energy source, as they've found In Voyager - Threshold (S2E15), where they discover more potent dilithium and are thus able to fly Warp 10.