Hiroki Osame
@hirok.io
👤 hirok.io
⚡️ Creator of @tsx.is
📦 Creator of https://pkg-size.dev
💞 Open Source https://github.com/privatenumber
💼 SWE @ Square
⚡️ Creator of @tsx.is
📦 Creator of https://pkg-size.dev
💞 Open Source https://github.com/privatenumber
💼 SWE @ Square
Reposted by Hiroki Osame
`oxc-minify` is now the recommended minifier when using @rolldown.rs!
While continuously tweaking the performance, the minifier is already outperforming `esbuild` in terms of speed and size.
Check out the benchmark by @hirok.io for perf comparison.
github.com/privatenumbe...
While continuously tweaking the performance, the minifier is already outperforming `esbuild` in terms of speed and size.
Check out the benchmark by @hirok.io for perf comparison.
github.com/privatenumbe...
GitHub - privatenumber/minification-benchmarks: 🏃♂️🏃♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler, tdewolff/minify, oxc-minify
🏃♂️🏃♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler, tdewolff/minify, oxc-minify - privatenumber/minification-benchmarks
github.com
April 27, 2025 at 3:34 PM
`oxc-minify` is now the recommended minifier when using @rolldown.rs!
While continuously tweaking the performance, the minifier is already outperforming `esbuild` in terms of speed and size.
Check out the benchmark by @hirok.io for perf comparison.
github.com/privatenumbe...
While continuously tweaking the performance, the minifier is already outperforming `esbuild` in terms of speed and size.
Check out the benchmark by @hirok.io for perf comparison.
github.com/privatenumbe...
🤖 Minification Benchmarks now includes an AI analysis with clear recommendations
No more manual analysis—read which minifier is best for your needs
It's also really entertaining to read:
github.com/privatenumbe...
No more manual analysis—read which minifier is best for your needs
It's also really entertaining to read:
github.com/privatenumbe...
March 15, 2025 at 4:58 AM
🤖 Minification Benchmarks now includes an AI analysis with clear recommendations
No more manual analysis—read which minifier is best for your needs
It's also really entertaining to read:
github.com/privatenumbe...
No more manual analysis—read which minifier is best for your needs
It's also really entertaining to read:
github.com/privatenumbe...
I vaguely remember a TypeScript discussion where they were considering deprecating tsconfig#paths in favor of package.json#imports (but concluded it was too early?)
I searched around but couldn't find it...
Does this ring a bell for anyone?
I searched around but couldn't find it...
Does this ring a bell for anyone?
January 17, 2025 at 12:50 AM
I vaguely remember a TypeScript discussion where they were considering deprecating tsconfig#paths in favor of package.json#imports (but concluded it was too early?)
I searched around but couldn't find it...
Does this ring a bell for anyone?
I searched around but couldn't find it...
Does this ring a bell for anyone?
dtsroll is a Type Script declaration file (.d.ts) bundler
Use it to:
- Tree-shake unused types
- Bundle in private monorepo deps
- Improve type-checking perf
👉 github.com/privatenumber/dtsroll
Use it to:
- Tree-shake unused types
- Bundle in private monorepo deps
- Improve type-checking perf
👉 github.com/privatenumber/dtsroll
January 11, 2025 at 1:42 PM
dtsroll is a Type Script declaration file (.d.ts) bundler
Use it to:
- Tree-shake unused types
- Bundle in private monorepo deps
- Improve type-checking perf
👉 github.com/privatenumber/dtsroll
Use it to:
- Tree-shake unused types
- Bundle in private monorepo deps
- Improve type-checking perf
👉 github.com/privatenumber/dtsroll
Reposted by Hiroki Osame
Great end to 2024 🎉
🌟 10k GitHub stars
⬇️ 19.5M downloads a month
Thank you everyone ❤️
🌟 10k GitHub stars
⬇️ 19.5M downloads a month
Thank you everyone ❤️
December 31, 2024 at 2:51 PM
Great end to 2024 🎉
🌟 10k GitHub stars
⬇️ 19.5M downloads a month
Thank you everyone ❤️
🌟 10k GitHub stars
⬇️ 19.5M downloads a month
Thank you everyone ❤️
In your TS project, enabling verbatimModuleSyntax is highly recommended for predictable compilation
If you haven't yet because of the errors it produces, I made an auto-fixer:
github.com/privatenumbe...
If you haven't yet because of the errors it produces, I made an auto-fixer:
github.com/privatenumbe...
December 25, 2024 at 8:13 AM
In your TS project, enabling verbatimModuleSyntax is highly recommended for predictable compilation
If you haven't yet because of the errors it produces, I made an auto-fixer:
github.com/privatenumbe...
If you haven't yet because of the errors it produces, I made an auto-fixer:
github.com/privatenumbe...
Why haven't Import Attributes taken off? Seems it stopped at JSON support
It would be great to be able to import text files and create a run-time dependency on it:
```ts
import fileContent from './file.txt' with { type: 'text' }
```
nodejs.org/api/esm.html...
It would be great to be able to import text files and create a run-time dependency on it:
```ts
import fileContent from './file.txt' with { type: 'text' }
```
nodejs.org/api/esm.html...
Modules: ECMAScript modules | Node.js v23.5.0 Documentation
nodejs.org
December 24, 2024 at 12:59 AM
Why haven't Import Attributes taken off? Seems it stopped at JSON support
It would be great to be able to import text files and create a run-time dependency on it:
```ts
import fileContent from './file.txt' with { type: 'text' }
```
nodejs.org/api/esm.html...
It would be great to be able to import text files and create a run-time dependency on it:
```ts
import fileContent from './file.txt' with { type: 'text' }
```
nodejs.org/api/esm.html...
Are you using tsx to import source files across workspace packages?
You may be making expensive trade-offs without realizing it
Here's a breakdown of the risks and better alternatives:
👉 hirok.io/posts/importing-source-files-in-dev
You may be making expensive trade-offs without realizing it
Here's a breakdown of the risks and better alternatives:
👉 hirok.io/posts/importing-source-files-in-dev
Think twice before importing package source files
Importing source files from packages during development can cost you more than it saves
hirok.io
December 16, 2024 at 10:21 PM
Are you using tsx to import source files across workspace packages?
You may be making expensive trade-offs without realizing it
Here's a breakdown of the risks and better alternatives:
👉 hirok.io/posts/importing-source-files-in-dev
You may be making expensive trade-offs without realizing it
Here's a breakdown of the risks and better alternatives:
👉 hirok.io/posts/importing-source-files-in-dev
Reposted by Hiroki Osame
Do yourself a favor and delete those hacks & brittle build steps you cobbled together, for your library to be consumable from both esm & cjs.
Then simply make sure your package.json declares the entrypoints you want & let pkgroll by @hirok.io do the rest!
What a delightful little tool ❤️
Then simply make sure your package.json declares the entrypoints you want & let pkgroll by @hirok.io do the rest!
What a delightful little tool ❤️
GitHub - privatenumber/pkgroll: 📦 Zero-config package bundler for Node.js + TypeScript
📦 Zero-config package bundler for Node.js + TypeScript - privatenumber/pkgroll
github.com
December 14, 2024 at 4:17 PM
Do yourself a favor and delete those hacks & brittle build steps you cobbled together, for your library to be consumable from both esm & cjs.
Then simply make sure your package.json declares the entrypoints you want & let pkgroll by @hirok.io do the rest!
What a delightful little tool ❤️
Then simply make sure your package.json declares the entrypoints you want & let pkgroll by @hirok.io do the rest!
What a delightful little tool ❤️
Reposted by Hiroki Osame
Hey PostCSS experts, folks have requested the ability to parse PostCSS-specific syntax in ESLint, but I really don't know how to accomplish that. Your comments on this issue would be appreciated:
github.com/eslint/css/i...
github.com/eslint/css/i...
Change Request: PostCSS syntax support · Issue #29 · eslint/css
Environment ESLint version: Latest (Possible to include the version on the Code Explorer?) @eslint/css version: Latest (Possible to include the version on the Code Explorer?) Node version: N/A npm ...
github.com
December 11, 2024 at 4:31 PM
Hey PostCSS experts, folks have requested the ability to parse PostCSS-specific syntax in ESLint, but I really don't know how to accomplish that. Your comments on this issue would be appreciated:
github.com/eslint/css/i...
github.com/eslint/css/i...
TIL the way you do onMounted in React is useEffect() with no dependencies
react.dev/learn/lifecy...
I rarely use React, but this feels kind of hacky to me
I feel like the framework beginners learn web dev with should set better examples of semantic & readable code
react.dev/learn/lifecy...
I rarely use React, but this feels kind of hacky to me
I feel like the framework beginners learn web dev with should set better examples of semantic & readable code
Lifecycle of Reactive Effects – React
The library for web and native user interfaces
react.dev
November 23, 2024 at 3:48 AM
TIL the way you do onMounted in React is useEffect() with no dependencies
react.dev/learn/lifecy...
I rarely use React, but this feels kind of hacky to me
I feel like the framework beginners learn web dev with should set better examples of semantic & readable code
react.dev/learn/lifecy...
I rarely use React, but this feels kind of hacky to me
I feel like the framework beginners learn web dev with should set better examples of semantic & readable code
Does anyone use `npm install --production` in their project?
I'm writing a blog post on package.json dependencies, and I can't find a practical use for this feature
I'm writing a blog post on package.json dependencies, and I can't find a practical use for this feature
November 21, 2024 at 8:58 AM
Does anyone use `npm install --production` in their project?
I'm writing a blog post on package.json dependencies, and I can't find a practical use for this feature
I'm writing a blog post on package.json dependencies, and I can't find a practical use for this feature
Looking for a lightweight on-the-go setup
I have a 16” MBP and I’d like something lighter…
Has anyone tried something like Mac mini with Tailscale, VNCing in from iPad with keyboard + trackpad?
Thinking it would be nice to be able to pick up where I left off at home but worried about battery
I have a 16” MBP and I’d like something lighter…
Has anyone tried something like Mac mini with Tailscale, VNCing in from iPad with keyboard + trackpad?
Thinking it would be nice to be able to pick up where I left off at home but worried about battery
November 17, 2024 at 2:14 AM
Looking for a lightweight on-the-go setup
I have a 16” MBP and I’d like something lighter…
Has anyone tried something like Mac mini with Tailscale, VNCing in from iPad with keyboard + trackpad?
Thinking it would be nice to be able to pick up where I left off at home but worried about battery
I have a 16” MBP and I’d like something lighter…
Has anyone tried something like Mac mini with Tailscale, VNCing in from iPad with keyboard + trackpad?
Thinking it would be nice to be able to pick up where I left off at home but worried about battery
Reposted by Hiroki Osame
Woah, I wish this guide existed when I had to figure this all out about a year ago.
If you publish packages to NPM, this is a must-read.
Also, check out the `publint` by @bluwy.me. It saved us from so many mistakes 👌
If you publish packages to NPM, this is a must-read.
Also, check out the `publint` by @bluwy.me. It saved us from so many mistakes 👌
Confused about the `exports` field in package.json?
I wrote a guide to break it down and walk you through it!
👉 hirok.io/posts/node-exports-guide
I wrote a guide to break it down and walk you through it!
👉 hirok.io/posts/node-exports-guide
Guide to the Node.js `exports` field
Take control over how your npm package is accessed with the package.json `exports` field
hirok.io
November 15, 2024 at 1:54 PM
Woah, I wish this guide existed when I had to figure this all out about a year ago.
If you publish packages to NPM, this is a must-read.
Also, check out the `publint` by @bluwy.me. It saved us from so many mistakes 👌
If you publish packages to NPM, this is a must-read.
Also, check out the `publint` by @bluwy.me. It saved us from so many mistakes 👌
Confused about the `exports` field in package.json?
I wrote a guide to break it down and walk you through it!
👉 hirok.io/posts/node-exports-guide
I wrote a guide to break it down and walk you through it!
👉 hirok.io/posts/node-exports-guide
Guide to the Node.js `exports` field
Take control over how your npm package is accessed with the package.json `exports` field
hirok.io
November 15, 2024 at 12:23 PM
Confused about the `exports` field in package.json?
I wrote a guide to break it down and walk you through it!
👉 hirok.io/posts/node-exports-guide
I wrote a guide to break it down and walk you through it!
👉 hirok.io/posts/node-exports-guide
I was excited to see the perf impact for @antfu.me since he has a much bigger output
Here are the results:
sponsors.svg: 2.94 MB → 1.26 MB
sponsors.wide.svg: 2.94 MB → 1.27 MB
sponsors.past.svg: 2.15 MB → 919 KB
sponsors.circles.svg: 2.99 MB → 1.39 MB
More than 50% reductions for every file! 👍
Here are the results:
sponsors.svg: 2.94 MB → 1.26 MB
sponsors.wide.svg: 2.94 MB → 1.27 MB
sponsors.past.svg: 2.15 MB → 919 KB
sponsors.circles.svg: 2.99 MB → 1.39 MB
More than 50% reductions for every file! 👍
November 7, 2024 at 4:26 AM
I was excited to see the perf impact for @antfu.me since he has a much bigger output
Here are the results:
sponsors.svg: 2.94 MB → 1.26 MB
sponsors.wide.svg: 2.94 MB → 1.27 MB
sponsors.past.svg: 2.15 MB → 919 KB
sponsors.circles.svg: 2.99 MB → 1.39 MB
More than 50% reductions for every file! 👍
Here are the results:
sponsors.svg: 2.94 MB → 1.26 MB
sponsors.wide.svg: 2.94 MB → 1.27 MB
sponsors.past.svg: 2.15 MB → 919 KB
sponsors.circles.svg: 2.99 MB → 1.39 MB
More than 50% reductions for every file! 👍
I just realized Bluesky's "domain as a handle" feature and it's actually so cool!
I get to see so many awesome domains people have that I've never seen
brb as I check out everyone's websites...
I get to see so many awesome domains people have that I've never seen
brb as I check out everyone's websites...
November 6, 2024 at 11:46 PM
I just realized Bluesky's "domain as a handle" feature and it's actually so cool!
I get to see so many awesome domains people have that I've never seen
brb as I check out everyone's websites...
I get to see so many awesome domains people have that I've never seen
brb as I check out everyone's websites...
November 6, 2024 at 6:56 AM