expressive-code-twoslash now lives under StudioCMS, and we’re shipping a major release with it. The repo moved from MatthiesenXYZ to withstudiocms/expressive-code-twoslash. We used the move to fix long-standing module and tooling issues and to ship features that were blocked before.
Why the move (and why the refactor)
New home. StudioCMS is where we’re building docs tooling and content experiences; expressive-code-twoslash is a core piece of that. Keeping the plugin in the same org as the rest of the stack makes it easier to maintain and evolve.
CJS and the weird quirks. The original Twoslash stack (and some dependencies) were built for CommonJS and ESM. In Astro and Vite that meant awkward workarounds, inconsistent behavior, and extra build steps. We stopped patching and went all-in on ESM: we forked and refactored the pieces we depend on so the whole pipeline is ESM-only and works cleanly with Astro and Vite. That refactor unlocked the rest of this release.
What’s in this release
This release bumps expressive-code-twoslash to 0.6.0 and introduces several new or updated packages. Here’s the high-level picture.
New ESM-only packages under @ec-ts/
- @ec-ts/twoslash (1.0.0) — ESM-only fork of Twoslash used by the plugin. No more CJS/ESM interop issues in Astro or Vite.
- @ec-ts/twoslash-vue (1.0.0) — ESM-only fork of twoslash-vue so Vue SFC code blocks work in the same modern toolchain.
- @ec-ts/vfs (1.0.0) — ESM fork of the TypeScript VFS layer. Unlocks virtual file system and “show emitted output” behavior in docs.
These live under the @ec-ts/ scope and are published from this repo; the main plugin now depends on them instead of the original CJS/ESM packages.
expressive-code-twoslash 0.6.0
- Vue support — Use the
"vue"language option and get Twoslash behavior (hover, errors, cuts, etc.) in Vue single-file components. The plugin picks the right twoslasher (TypeScript vs Vue) automatically. - Twoslash ESLint — New
eslintcode-block type. Writets eslint(or the equivalent for your setup), and ESLint diagnostics show up as annotations in the code block. Great for docs that teach lint rules or code quality. - VFS and showEmit — The virtual file system and “show emitted output” are enabled. You can show compiled output, declaration files, or other emit artifacts next to the source in your docs.
- TSDown — We moved the plugin’s build to the TSDown compiler for a simpler, more consistent build.
- Defaults and config — Twoslash-related defaults and config have been cleaned up and modernized so they’re easier to reason about and extend.
- Popup and script handling — Popup script generation and loading have been reworked for more reliable behavior and event handling.
css-js-gen 1.1.0
- csstype — The package now uses
csstypefor typings, so you get accurate TypeScript types for CSS-in-JS style objects. - camelCase — Support for camelCase CSS properties where it matters for JS-driven styles.
- Tests and reporting — Broader test coverage and Allure-based test reports for the CSS generation pipeline.
Who this is for
If you already use expressive-code-twoslash in an Astro or Vite docs site, this release gives you:
- One ESM-only dependency tree—no CJS/ESM interop workarounds.
- Vue and ESLint code blocks plus VFS/showEmit so you can document Vue components and lint rules in code.
- A maintained home under StudioCMS and a clear path for future improvements.
If you’re new to the plugin: it brings Twoslash-style behavior (inline type hovers, error underlines, code cuts, completions, and more) to Expressive Code code blocks. TypeScript (and now Vue) code samples in your docs can show real types, compiler errors, and emitted output without leaving the page.
Try it
- Docs: twoslash.studiocms.dev
- Repo: github.com/withstudiocms/expressive-code-twoslash
- npm:
expressive-code-twoslash,@ec-ts/twoslash,@ec-ts/twoslash-vue,@ec-ts/vfs,css-js-gen - Chat: Discord
The release is going out via PR #65. Once it’s merged, the new versions will publish to npm. If you run into issues upgrading, open an issue or drop by Discord—we want the move to 0.6 to be smooth.
Ready to try expressive-code-twoslash 0.6? Check out the documentation to get started, or join our Discord to connect with the team and other users.
Paul Valladares
Published 3/3/2026Back to Blog