Marvin Hagemeister

@marvinh.dev

I build simple and fast things. Part of Preact team.

How to speed up vitest: De-barrel everything so that the module graph gets smaller. Saves both processing + import time. And get rid of module mocks, which prevents many de-barelling opportunities.

I feel like it has become hard to follow actual discussions on PRs with so many integrations commenting. Not sure why GitHub hasn't given them a dedicated integration rather than everyone just using comments.

You only notice how bad npm's 2FA token reuse is once you transition 102 repositories to use provenance with GitHub environment gating... I had a 2FA code in my clipboard that worked for a solid minute

New post on supply chain security for npm packages — covering the publishing workflow I push in the projects I maintain, plus the consumer side: why pnpm is a better default than npm, its native minimumReleaseAge config, and trustPolicy: no-downgrade to catch provenance regressions automatically.

Hardening publishing & consuming

A practical look at reducing blast radius in npm publishing workflows — environment-gated OIDC publishing, limiting manual access, and what consumers can do on their end.

jovidecroock.com

TSRX now supports Vue Vapor! Plus we've extended the runtimes support to include Preact. We will soon have an MCP server for TSRX so you can plug it into your favorite AI agent. TSRX is still alpha, so we're looking for early feedback from the Vue community tsrx.dev/getting-star...

Vue + Vite
Install the Vue compiler, its Vite plugin, the Vue runtime, and the Vapor JSX plugin:

 pnpm install @tsrx/vue @tsrx/vite-plugin-vue vue vue-jsx-vapor
Then wire both plugins into your Vite config (order matters — tsrxVue first):

 import { defineConfig } from 'vite';
 import tsrxVue from '@tsrx/vite-plugin-vue';
 import vueJsxVapor from 'vue-jsx-vapor/vite';

 export default defineConfig({
   plugins: [
     tsrxVue(),
     vueJsxVapor({
       macros: true,
       compiler: { runtimeModuleName: 'vue-jsx-vapor' },
     }),
   ],
 });
@tsrx/vite-plugin-vue compiles .tsrx modules into Vue-flavoured TSX, and vue-jsx-vapor/vite performs the downstream Vapor JSX transform. For editor typechecking, set jsxImportSource: "vue-jsx-vapor" in your tsconfig.json.