To use the window module, import wixWindowFrontend
from the @wix/site-window
module:
import wixWindowFrontend from "@wix/site-window";
The APIs in @wix/site-window
can only be used in front-end code.
Learn more about @wix/site-window in Getting Started and on Wix Learn.