minify-js
minify-js copied to clipboard
Extremely fast JavaScript minifier, available for Rust and Node.js
While using trunk, importing a script seems to be working improperly unless minification is turned off. The maintainer of trunk pointed me to minify-js, listing it as the minification library...
``` import {minify} from '@minify-js/node' ^^^^^^ SyntaxError: The requested module '@minify-js/node' does not provide an export named 'minify' at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21) at async ModuleJob.run (node:internal/modules/esm/module_job:217:5) at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {...
Fixes #18 Hello, This fixes two issues I found after upgrading to 0.6.0 - When using an if statement in the global scope searching for the closure scope would fail...
### Describe the Bug Trunk uses this library to do minifcation. It seems to strip getters. In my minimal repro, using a release build will default to using minification in...
The URL the post-install script tries to access on my M2 MacBook is https://static.wilsonl.in/minify-js/nodejs/0.6.0/darwin__arm64.node which 404s. And building fails: ``` Failed to download @minify-js/node, will build from source: Error: Bad...
The code ```alert("hello \"john\"");```, when minified, becomes ```alert(`hello \\"john\\"`)```. This is incorrect and results in two extra backslashes being introduced in the alert. Tested in v0.5.6 because v0.6.0 has no...
I'm currently using the rust crate, version "0.6.0" and getting an assertion failure that I don't really understand. The following code reproduces the issue: ``` js function demoFunc() { if...
I am using the current git version of `minify-js`. The following issue happens from version `0.6.0` (`0.5.6` works fine). When I try minify the code `if (a) a`, I get...
https://static.wilsonl.in/minify-js/cli/0.6.0/linux-x86_64/minify-js linked from front page is broken, but macos one downloads fine.
_This is all valid js_ ```pwsh ❯ minify-js --version minify-js 0.6.0 ❯ @' import { readFile } from 'fs/promises' const buf = await readFile(`test`) '@ | minify-js --mode module thread...