Authoring Nuxt Layers: Build a Custom Email Layer
Plans from $25/month

This lesson is for members. Join us?

Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.

Imports in Nuxt Layers

When dealing with imports in Nuxt layers, some ways work sometimes, other ways don’t work at all, and one way works all the time. Learn the best method for writing import statements in Nuxt layers so that it works everywhere.

The Nuxt layer import alias #layers/[layer-name] was introduced in Nuxt v3.16.0 and makes importing layer JS/TS modules intuitive and type-safe in both the layer source code and the consuming app.

Links