{"id":15643,"library":"haya","title":"Haya: ESBuild Dev Server & Bundler","description":"Haya is an experimental development server and production bundler leveraging `esbuild` for both development and build processes, in contrast to similar tools like Vite which utilize Rollup for production builds. Currently at version `0.0.10`, it is in a very early stage of development and explicitly not recommended for serious production projects. Its release cadence appears rapid, with frequent minor version updates introducing features like Vue support and asset handling (e.g., `?raw`, `?worker`). Key differentiators include its `esbuild`-only approach for bundling, which aims for potentially faster production builds, and a reliance on full-page reloads during development instead of fine-grained Hot Module Replacement (HMR). It provides out-of-the-box support for TypeScript, JSX/TSX, CSS, and PostCSS, with path alias configuration available via `tsconfig.json`.","status":"active","version":"0.0.10","language":"javascript","source_language":"en","source_url":"https://github.com/egoist/haya","tags":["javascript","esbuild","vite","dev","server","webpack","bundler","web","development","typescript"],"install":[{"cmd":"npm install haya","lang":"bash","label":"npm"},{"cmd":"yarn add haya","lang":"bash","label":"yarn"},{"cmd":"pnpm add haya","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for Vue Single File Component (SFC) support.","package":"@vue/compiler-sfc","optional":true}],"imports":[{"note":"Haya is an ESM-first package. Programmatic APIs should be imported using ES Modules syntax.","wrong":"const { createServer } = require('haya')","symbol":"createServer","correct":"import { createServer } from 'haya'"},{"note":"All programmatic APIs are named exports from the main 'haya' package. Avoid direct subpath imports unless explicitly documented.","wrong":"import build from 'haya/build'","symbol":"build","correct":"import { build } from 'haya'"},{"note":"CommonJS `require` syntax is not recommended; Haya targets Node.js >=16 which fully supports ES Modules.","wrong":"const preview = require('haya').preview","symbol":"preview","correct":"import { preview } from 'haya'"}],"quickstart":{"code":"npx aho@latest egoist/haya/template my-app\ncd my-app\nnpm install\n\n# Start development server\nnpm run dev\n\n# Build for production\nnpm run build\n\n# Preview production build\nnpm run preview","lang":"bash","description":"Demonstrates how to scaffold a new Haya project, install dependencies, and run basic development and build commands."},"warnings":[{"fix":"Use with caution and monitor updates. Consider it for experimental or personal projects only.","message":"Haya is in a very early stage of development (current version 0.0.10) and is explicitly not recommended for serious projects. Features and APIs may be unstable.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Design applications to tolerate full page reloads, or consider alternative bundlers like Vite if HMR is a critical development requirement.","message":"Haya currently only supports full page reloading during development, lacking fine-grained Hot Module Replacement (HMR) for JavaScript files.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Regularly consult the changelog for each update (e.g., `https://github.com/egoist/haya/blob/main/CHANGELOG.md`) and be prepared to adapt your codebase.","message":"As a pre-1.0 package, Haya's APIs and internal mechanisms are subject to frequent breaking changes without major version increments.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"If using Vue, install `@vue/compiler-sfc` alongside Haya: `npm install @vue/compiler-sfc`.","message":"Vue Single File Component (SFC) support requires `@vue/compiler-sfc` as a peer dependency, which must be installed manually.","severity":"gotcha","affected_versions":">=0.0.9"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Upgrade your Node.js environment to version 16 or newer using a tool like `nvm` or by installing a recent Node.js distribution.","cause":"The installed Node.js version does not meet Haya's minimum requirement of Node.js 16 or higher.","error":"Error: `haya` requires Node.js version >=16. Current version is X."},{"fix":"Install the Vue compiler: `npm install @vue/compiler-sfc`.","cause":"Attempting to use Vue components without the required peer dependency `@vue/compiler-sfc` installed.","error":"Cannot find module '@vue/compiler-sfc' or its corresponding type declarations."},{"fix":"Install PostCSS as a dev dependency: `npm install postcss -D`.","cause":"A `postcss.config.js` or `postcss.config.cjs` file exists, but PostCSS itself is not installed.","error":"Error: Cannot find module 'postcss'"}],"ecosystem":"npm"}