Nuxt/docs/2.directory-structure/1.utils.md
Sébastien Chopin cd7627d9ff chore: wip
2023-03-27 15:17:17 +02:00

1012 B

title head.title description
utils/ utils/ Use the utils/ directory to auto-import your utility functions throughout your application.

Utils Directory

Nuxt 3 uses the utils/ directory to automatically import helper functions and other utilities throughout your application using auto-imports!

::alert{type=info} The main purpose of the utils/ directory is to allow a semantic distinction between your Vue composables and other auto-imported utility functions.

The way utils/ auto-imports work and are scanned is identical to the composables/ directory. You can see examples and more information about how they work in that section of the docs. ::

::alert{type=info} These utils are only available within the Vue part of your app. Within the server directory, we auto import exported functions and variables from ~/server/utils instead. ::