Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 408 Bytes

File metadata and controls

19 lines (15 loc) · 408 Bytes
title isServer
const isServer: boolean

This indicates that the code is being run as the server or browser bundle. As the underlying runtimes export this as a constant boolean it allows bundlers to eliminate the code and their used imports from the respective bundles.

if (isServer) {
	// I will never make it to the browser bundle
} else {
	// won't be run on the server;
}