Bathroom Wiring - Existing light - Add Bath fan - Add gfci outlet
If we are talking recent code, NEC requires a 20A circuit dedicated to bathroom receptacles. This circuit cannot service lighting in other rooms but there is an exception for what you contemplate: to service a 10A or less load for fan and lights in the one bathroom. The point of this requirement is so that your blow dryer doesn't pop the circuit.

When you modify this circuit you need to bring it up to code and that may prove difficult if the branch servicing that light switch is only 15A and/or services other light switches (as I suspect it does). Getting this up to code would then require you to run a new 20A branch circuit from the service panel.

Having said that, either of your proposed configurations works fine. There is no problem pigtailing off the line in the switch box to install an unswitched outlet box elsewhere. Just do this on the line side of the switch.


  [210.11(C)(3)] One 20A, 120V branch circuit must be provided for the receptacle outlets required by 210.52(D) for all dwelling unit
  bathrooms. This 20A bathroom receptacle circuit must not serve any
  other outlet, such as bathroom lighting outlets or receptacle outlets
  in other rooms (Fig. 1). A 15A, 125V receptacle is rated for 20A
  feed-through, so it can be used for this purpose [210.21(B)(3)].
  
  [210.11(C)(3), Exception] A single 20A, 120V branch circuit is permitted to supply all of the outlets (including outlets for lighting
  and equipment) in a single bathroom, as long as no single load
  fastened in place is rated more than 10A [210.23(A)] (Fig. 2).