{"id":26980,"library":"fastify-bundler","title":"tailwindcss-forms-bundler","description":"tailwindcss-forms-bundler is a Node.js library for fetching resources from various icon CDN providers, including Cloudflare, Fastly, KeyCDN, Akamai, Amazon CloudFront, and Gcore. It supports fetching icons, images, content, JavaScript, and JSON files. Version 1.4.11 is the latest stable release. The library offers a simple API with a single function, setDefault, to fetch resources. Compared to similar libraries, it provides a unified interface for multiple CDN providers. Note: the npm package name and GitHub repo appear mismatched (fastify-bundler vs tailwindcss-forms-bundler), suggesting possible typosquatting.","status":"active","version":"1.4.11","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","react","helper","svg"],"install":[{"cmd":"npm install fastify-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add fastify-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add fastify-bundler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package name in the README is 'tailwindcss-forms-bundler', not 'fastify-bundler' which is the npm name. Common mistake is using the npm package name 'fastify-bundler' which may be a different or malicious package.","wrong":"const { setDefault } = require('fastify-bundler')","symbol":"setDefault","correct":"const { setDefault } = require('tailwindcss-forms-bundler')"},{"note":"This is a named export, not a default export. Using default import will result in undefined.","wrong":"import setDefault from 'tailwindcss-forms-bundler'","symbol":"setDefault","correct":"import { setDefault } from 'tailwindcss-forms-bundler'"},{"note":"The README mentions fetchIconProvider in text but setDefault is the actual exported function. Documentation inconsistency may cause confusion.","wrong":"","symbol":"fetchIconProvider","correct":"import { fetchIconProvider } from 'tailwindcss-forms-bundler'"}],"quickstart":{"code":"const { setDefault } = require('tailwindcss-forms-bundler');\n\nsetDefault(\n  \"cloudflare\",\n  \"icon\",\n  \"your-token\",\n  \"https://your-base-url.com\"\n)\n  .then((data) => {\n    console.log(\"Resource data:\", data);\n  })\n  .catch((error) => {\n    console.error(\"Error fetching resource:\", error);\n  });","lang":"javascript","description":"Demonstrates how to require and use the setDefault function to fetch an icon from the Cloudflare CDN provider."},"warnings":[{"fix":"Verify the package's origin and integrity before using. Check the GitHub repository linked in README.","message":"Package naming inconsistency: npm package is 'fastify-bundler' but README uses 'tailwindcss-forms-bundler'. Possible typosquatting or malicious package.","severity":"gotcha","affected_versions":"*"},{"fix":"Use 'setDefault' instead of 'fetchIconProvider' as the correct API.","message":"The 'setDefault' function is the only exported function, but documentation mentions 'fetchIconProvider' which may not exist.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use 'import { setDefault } from 'tailwindcss-forms-bundler'' with ESM.","message":"CommonJS require() may be deprecated in future versions; consider switching to ESM imports.","severity":"deprecated","affected_versions":">=1.4.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use named import: import { setDefault } from 'tailwindcss-forms-bundler'","cause":"Using default import instead of named import.","error":"TypeError: setDefault is not a function"},{"fix":"Install the correct package: npm install fastify-bundler, then require it as 'fastify-bundler'.","cause":"npm package name is 'fastify-bundler' but code requires 'tailwindcss-forms-bundler'.","error":"Cannot find module 'fastify-bundler'"},{"fix":"Check supported providers: cloudflare, fastly, keycdn, akamai, amazon-cloudfront, gcore","cause":"Invalid provider name or unsupported provider.","error":"Error: Provider 'cloudflare' not supported"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}