I find a place in the bedroom that offers cover, barring that concealment like a corner on the wall that the door is in, wait till the intruder enters, ID the threat and take action from there.
I can't think of any grand jury or states attorney that would accept you blindly shooting through the door. Even in a state like Texas where you can shoot to defend property after dark, I doubt that you'd survive the civil suit with any type of a life after it was over.
If you are waiting with the doorway covered you will almost certainly be able to shoot first if the situation calls for it. (dumb luck excluded)