In generative grammar, the definition of a morpheme depends heavily on whether syntactic trees have morphemes as leaves or features as leaves.
Direct surface to syntax mapping LFG – leaves are words
Direct syntax to semantics mapping
Leaves in syntactic trees spell out morphemes: Distributed morphology – leaves are morphemes
Branches in syntactic trees spell out morphemes: Radical Minimalism and Nanosyntax – leaves are "nano" morpho-syntactic features
Given the definition of morpheme as "the smallest meaningful unit" Nanosyntax aims to account for idioms where it is often an entire syntactic tree which contributes "the smallest meaningful unit." An example idiom is "Don't let the cat out of the bag" where the idiom is composed of "let the cat out of the bag" and that might be considered a semantic morpheme, which is composed of many syntactic morphemes. Other cases where the "smallest meaningful unit" is larger than a word include some collocations such as "in view of" and "business intelligence" where the words together have a specific meaning.
The definition of morphemes also play a significant role in the interfaces of generative grammar in the following theoretical constructs;
Event semantics: the idea that each productive morpheme must have a compositional semantic meaning (a denotation), and if the meaning is there, there must be a morpheme (null or overt).
Spell-out: the interface where syntactic/semantic structures are "spelled-out" using words or morphemes with phonological content. This can also be thought of as lexical insertion into the syntactics.