Deploying a Nuxt.js Store on Magento

Deliver a sub-second Nuxt.js website on Magento with Layer0

Nuxt.js is an open-source, serverless framework based on multiple frameworks including Vue.js, Node.js, Webpack and Babel.js. Created to build fast, complex isomorphic applications quickly. The framework handles the complex pre-coding configuration and UI rendering for your app, so that developers can focus on writing code. Additional benefits of Nuxt.js include automatic code-splitting, page caching and prefetching, bundling, and static site generation.

Nuxt.js is fully capable of delivering the speedy websites that consumers demand. We performed a study to discover which modern frontend framework delivers the fastest websites and found Nuxt.js leads the pack, in front of React, Angular, Vue.js and Next.js. Layer0 is proud to be a Nuxt.js sponsor to help promote modern, open-source frameworks working to facilitate a faster Web.

Magento 2 is a popular eCommerce platform, known for its rich, out-of-the-box features, third-party integrations, and customizations. The platform is based on PHP7 and supports HTML5, and supports multiple frameworks, including the Zend Framework 1 and 2 and MySQL Percona 5.6 or greater, in addition to its own proprietary frontend frameworks.

Key features which help performance include:

  • NGINX: This serves as a reverse proxy, HTTP cache, and load balancer.
  • Varnish: This is an HTTP accelerator specifically for content-heavy dynamic web pages, such as eCommerce websites on Magento 2.
  • Composer: This tool is used for dependency management in PHP, which allows you to reuse third-party libraries without bundling with source code and reduce extension conflicts.
  • Symfony: This PHP web application framework is used for controlling the content, functionality, and look and feel of your online store.
  • Redis: This is an open source, in-memory data structure store used as a database, cache and message broker.

While there are some promising features in Magento 2, including a built in caching module, it's important to note that the platform does little to help vendors in terms of site speed. In fact, the platform leaves most site speed optimization to its customers and their developers / implementors.

In terms of frontend compatibility, the platform offers a few proprietary frontends and robust APIs. Magento 2 frontends include: Base, Luma, and PWA Studio (available for M2.3 and up) and APIs include: REST, SOAP, and GraphQL. Please note that PWA Studio and GraphQL are both only supported on Magento 2.3 or later. Furthermore, PWA Studio is geared specifically toward the platform, so you remain locked into its ecosystem. You can connect your own portable frontend or headless endpoints to the platform via the GraphQL API, however, customization of  Magento's code and/or database schema can disrupt API compatibility.  

Layer0 lets you deliver Nuxt.js stores on Magento for sub-second speeds with every load. Please note that while Magento 1 is no longer supported by the platform, it is still compatible with Layer0. The average website on Layer0 sees median page loads of 320ms, measured by Largest Contentful Paint (LCP), one of the three critical Core Web Vitals. However, Layer0 is much more than a website accelerator. It's known as the Jamstack platform for eCommerce websites. Layer0 makes websites faster for users and simpler for frontend developers to maintain. Built specifically for large-scale, database-driven websites (such as eCommerce and Travel), it brings the following benefits: 

  • Jamstack for eCommerce via both pre and just-in-time rendering
  • Zero latency networking via prefetching of data from your product catalog APIs
  • An edge that can be configured natively in your Nuxt.js app (CDN-as-JavaScript)
  • Edge rules that can run locally, in pre-production and production environments  
  • Automated, full-stack preview URLs from GitHub, GitLab, or Bitbucket with every new branch and push
  • Performant split tests at the edge and A/B tests that do not slow down the site, canary deploys, and personalization
  • Serverless JavaScript that is much easier and more reliable than AWS Lambda

With Layer0, your Nuxt.js Magento store will run in sub-second speeds and your developers will be empowered to control edge caching and reduce rework using the various developer productivity tools that come with the platform.

Browse around AKIRA, a Magento website on Layer0. AKIRA sped up its mobile site by 71% with first-page loads being down from nearly 5 seconds to just north of 1 second, and subsequent pages loading in 500 milliseconds or less on Layer0.

If you're currently using Nuxt.js, use the this guide to deploy your Nuxt.js application on Layer0 and get sub-second loads in as little as 1 hour of work. 

Deploy in minutes

Moovweb XDN works with all frontends
Deploy freeTakes 2 minutes