Western Australia has been battered by a "once-in-a-generation" storm, leaving a path of destruction Geraldton to Albany.

As the massive storm's set to bare down on parts of WA, the coastal town of Lancelin is tonight on high alert as huge swells threaten to breach its already eroded coastline.

Perth and large parts of the WA coastline are set to be smashed by severe rain and thunderstorms today.