Registry / web-framework / haya
library0.1.0jsnpmunverified

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`.

npm install haya
INSTALL
IMPORT
SIG · HAYA
H
haya
web-frameworkjavascriptv0.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createServer
import { createServer } from 'haya'
const { createServer } = require('haya')
Haya is an ESM-first package. Programmatic APIs should be imported using ES Modules syntax.
build
import { build } from 'haya'
import build from 'haya/build'
All programmatic APIs are named exports from the main 'haya' package. Avoid direct subpath imports unless explicitly documented.
preview
import { preview } from 'haya'
const preview = require('haya').preview
CommonJS `require` syntax is not recommended; Haya targets Node.js >=16 which fully supports ES Modules.

Demonstrates how to scaffold a new Haya project, install dependencies, and run basic development and build commands.

npx aho@latest egoist/haya/template my-app cd my-app npm install # Start development server npm run dev # Build for production npm run build # Preview production build npm run preview
haya --version
Debug
Known issues
gotchaHaya 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.
fix
Use with caution and monitor updates. Consider it for experimental or personal projects only.
affects: >=0.0.1
gotchaHaya currently only supports full page reloading during development, lacking fine-grained Hot Module Replacement (HMR) for JavaScript files.
fix
Design applications to tolerate full page reloads, or consider alternative bundlers like Vite if HMR is a critical development requirement.
affects: >=0.0.1
breakingAs a pre-1.0 package, Haya's APIs and internal mechanisms are subject to frequent breaking changes without major version increments.
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.
affects: >=0.0.1
gotchaVue Single File Component (SFC) support requires `@vue/compiler-sfc` as a peer dependency, which must be installed manually.
fix
If using Vue, install `@vue/compiler-sfc` alongside Haya: `npm install @vue/compiler-sfc`.
affects: >=0.0.9
Errors
Common errors & fixes
Error: `haya` requires Node.js version >=16. Current version is X.
The installed Node.js version does not meet Haya's minimum requirement of Node.js 16 or higher.
fix
Upgrade your Node.js environment to version 16 or newer using a tool like `nvm` or by installing a recent Node.js distribution.
Cannot find module '@vue/compiler-sfc' or its corresponding type declarations.
Attempting to use Vue components without the required peer dependency `@vue/compiler-sfc` installed.
fix
Install the Vue compiler: `npm install @vue/compiler-sfc`.
Error: Cannot find module 'postcss'
A `postcss.config.js` or `postcss.config.cjs` file exists, but PostCSS itself is not installed.
fix
Install PostCSS as a dev dependency: `npm install postcss -D`.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
@vue/compiler-sfcoptionalRequired for Vue Single File Component (SFC) support.
Agent activity
8 hits · last 30 days
node
8
Resources
haya — npm install haya · libregistry