Skip to content

Utilities 4.3.8

The @forastro/utilities package is a package that has practical functions and components that are used for development with Astro.js.

This library gives you the following kinds of tools

  • Range functions
  • Iteration functions
  • Template projection
  • Condition evaluation functions
  • Error Functions
  • Content Collection Helpers

DANGER

The components that are used by the package are Server Components.

shell
   pnpm add @forastro/utilities
   pnpm add @forastro/utilities
shell
   yarn add @forastro/utilities
   yarn add @forastro/utilities
shell
   npm i @forastro/utilities
   npm i @forastro/utilities

You must now set vite.optimizeDeps.exclude to ["astro:content"] in astro config.

This library now uses astro:content to expand it's API's to give devs a much better experience when using getCollections(). Unfortunately this is the cost.

ts
// astro.config.mjs
  export default {
   vite: {  
      optimizeDeps:{  
         exclude: ["astro:content"] 
      } 
   } 
  }
// astro.config.mjs
  export default {
   vite: {  
      optimizeDeps:{  
         exclude: ["astro:content"] 
      } 
   } 
  }

Recommendations

I think it a good idea to pair this library with

All Libraries are MIT