Interactive Learning Platform Nuxt layer

Isolated learning atmosphere · v4.x

← Back to writing
All tutorials
Nuxt v4.xAdvanced Released July 28, 2026 · ~32 min

Nuxt Layers: Advanced

Based on the official Nuxt release notes

Everything so far assumed the layer is in your repo and you're the only consumer. Once neither is true, three questions show up and all three have sharp edges:

  • How do I consume a layer I can't publish? Remote layers work, and their caching model will surprise you.
  • Should this be a layer or a module? They overlap enough that "either would work" is usually true and usually wrong.
  • How do I test a layer? There's no app to run — so you build a fixture app that exists only to be a consumer.

Remote layers are the feature most likely to bite a team. They resolve at config load, they're cached outside your lockfile, and a moving branch reference means two machines can build different sites from the same commit. Step one is mostly about containing that.

What we cover here#

  1. Remote and Private Layers — git sources, auth, caching, and the pinning discipline that makes them safe.
  2. Layer or Module? — the decision rule, and the packages that are both.
  3. Testing and Publishing — fixture apps with @nuxt/test-utils, what to put in files, and versioning something with no build output.

Where it goes next#

How this series works#

Each step follows the same path: What it is → Why you'd care → Before → After → Do it yourself → Gotchas → Recap.

Prerequisites: The Basics and Going Further.