Wix reduced the amount of JavaScript by rewriting components into smaller, feature-specific components and moving the logic for calculating view data from the client side to a frontend server, which then sends only the necessary view data to the client.