SWC-248: support code preview client-side