Replace vanilla-Window with env variable check