Registry / devops / yuku-minify

yuku-minify

JSON →
library0.5.19jsnpmunverified

yuku-minify is a high-performance JavaScript and TypeScript minifier written in Zig, currently at version 0.5.19. It focuses on speed and correctness, leveraging Zig's low-level control and safety. Differentiators include near-instant minification, small output size, and comprehensive ES2022+ support. The package releases regularly, often addressing edge cases and performance improvements. It ships with TypeScript type definitions for easy integration.

npm install yuku-minify
INSTALL
IMPORT
SIG · YUKU-MINIFY
Y
yuku-minify
devopsjavascriptv0.5.19
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

minify
import { minify } from 'yuku-minify'
const minify = require('yuku-minify')
ESM-only; use named import for the main function.
minifySync
import { minifySync } from 'yuku-minify'
import minifySync from 'yuku-minify'
Named export, not default. Synchronous version of minify.
MinifyOptions
import type { MinifyOptions } from 'yuku-minify'
import { MinifyOptions } from 'yuku-minify'
Type import only; not a runtime value.

Demonstrates basic async minification with options from a string input.

import { minify } from 'yuku-minify'; const code = `function hello(name) { console.log('Hello, ' + name); }`; try { const result = await minify(code, { filename: 'hello.js', compress: true }); console.log(result.code); } catch (err) { console.error('Minification failed:', err); }
Debug
Known issues
gotchaESM-only: This package only supports ES modules (import/export). CommonJS require() will throw an error.
fix
Use import syntax in your project or switch to dynamic import() if in a CommonJS context.
affects: >=0.1.0
deprecatedThe `minifySync` function is deprecated in favor of `minify` (async) for better performance.
fix
Replace minifySync with await minify()
affects: >=0.4.0
breakingIn version 0.5.0, the output format changed: previously result contained `output`, now it uses `code` property.
fix
Access result.code instead of result.output
affects: >=0.5.0
gotchaMinify options have strict types: unknown keys cause the function to throw at runtime, not silently ignore.
fix
Use TypeScript and check the MinifyOptions type for valid properties.
affects: >=0.5.0
Errors
Common errors & fixes
Cannot find module 'yuku-minify'
Package not installed or missing in package.json.
fix
Run `npm install yuku-minify`
The requested module 'yuku-minify' does not provide an export named 'minify'
Attempting to use CommonJS require in an ESM-only package.
fix
Use `import { minify } from 'yuku-minify'` instead of require.
TypeError: minify is not a function
Using default import instead of named import.
fix
Change `import minify from 'yuku-minify'` to `import { minify } from 'yuku-minify'`.
Upgrade
Version history
0.5.19latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
Resources
yuku-minify — npm install yuku-minify · libregistry