Getting started
Using nuxt-lazyload-files
Installation
- Install
nuxt-lazyload-files
dependency to your project:
bun
bunx nuxi@latest module add nuxt-lazyload-css
- Add it to your
modules
section in yournuxt.config
:
nuxt.config (Nuxt 3)
export default defineNuxtConfig({
modules: ["nuxt-lazyload-files"],
});
Options
- Configure module by using the
lazyLoadFiles
property innuxt.config
:
nuxt.config
export default defineNuxtConfig({
lazyLoadFiles: {
// Options
},
});
It is also possible to add the options directly in the module declaration:
nuxt.config
export default defineNuxtConfig({
modules: [
[
"@nuxtjs/google-fonts",
{
// options
},
],
],
});
✨ And that's it! Now the defined files will load lazily based on the rules configured
Play online
You can start playing with Docus in your browser using Stackblitz:
Play on StackBlitzTable of Contents