Just to clary, the wasm for an imported actor class is actually embedded in the wasm of the importing code.
Adding the additional compilation target to the dfx.json, (thus compiling the imported class on its own) has the side-effect of producing the wasm of the imported class as a separate, non-embedded thing.
As far as I know, that’s the only way to do this just now.
I’ve considered making the wasm of an imported class programmatically accessible as a blob somehow, or, alternatively, providing additional functions to perform manual installation/upgrade with all IC parameters exposed in the imported library (in addition to the class constructor), but they all seem like hacky solutions and are difficult to make type safe.