DejaVue

Nuxt Tips You Have To Know

Aug 1, 2024
Discover essential Nuxt tips that can elevate your development game. Learn how to manage auto imports for better code control and optimize your build process with the '.nuxtignore' file. Delve into efficient data fetching strategies and the significance of custom keyed composables. Explore the advantages of using layers to enhance code organization and navigate the complexities of configuration options and available modules. Plus, get insights on community engagement and upcoming events related to Vue.js!
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Disable Nuxt Auto Imports

  • Disable Nuxt's auto imports if they feel too magical or confusing for your project.
  • Use the imports.scan config to turn off auto-import of composables and utils selectively.
INSIGHT

Auto Imports Ideal Scope

  • Auto imports are great for smaller projects to reduce boilerplate code.
  • For larger projects, manual imports reduce naming collisions and increase clarity.
ADVICE

Use .nuxtignore to Exclude Files

  • Use the .nuxtignore file to exclude files or directories from Nuxt's build process.
  • It works like .gitignore and helps keep your build clean and efficient.
Get the Snipd Podcast app to discover more snips from this episode
Get the app