npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gluebi/vue-resilient-error-boundary

v1.0.0

Published

Vue 3 error boundary that freezes DOM on error instead of unmounting content

Readme

@gluebi/vue-resilient-error-boundary

Vue 3 error boundary that freezes DOM on error instead of unmounting content.

When a child component throws, this component:

  1. Snapshots the current DOM (taken on mount and refreshed on error)
  2. Replaces the live component tree with frozen HTML via v-html
  3. Blocks interaction with a pointer-events: none overlay and cursor: not-allowed
  4. Emits an @error event for the consumer to handle logging

No existing Vue/Nuxt library does this — every error boundary unmounts content and shows a fallback. This component preserves what the user was seeing.

Install

pnpm add @gluebi/vue-resilient-error-boundary

Usage (Vue 3)

<script setup>
import { ResilientErrorBoundary } from '@gluebi/vue-resilient-error-boundary'
import '@gluebi/vue-resilient-error-boundary/style.css'
</script>

<template>
  <ResilientErrorBoundary context="product-tile-42" @error="handleError">
    <ProductTile :product="product" />
  </ResilientErrorBoundary>
</template>

Usage (Nuxt 3)

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@gluebi/vue-resilient-error-boundary/nuxt'],
})

The Nuxt module auto-imports the component and CSS. No manual imports needed:

<template>
  <ResilientErrorBoundary context="product-tile-42" @error="handleError">
    <ProductTile :product="product" />
  </ResilientErrorBoundary>
</template>

Enriched logging with provide/inject

For parent-level error handlers with enriched context (e.g., container data for Datadog):

import { RESILIENT_ERROR_HANDLER_KEY } from '@gluebi/vue-resilient-error-boundary'

// In a parent/wrapper component:
provide(RESILIENT_ERROR_HANDLER_KEY, (error: Error, context: string) => {
  logger.error('tile-error', { error, context, containerData })
})

The handler receives the normalized Error object and the context string from the boundary.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | context | string | 'unknown' | Identifier passed to @error and the injected handler |

Events

| Event | Payload | Description | |-------|---------|-------------| | error | Error | Emitted when a child component throws |

How it works

  • Uses display: contents on wrapper elements — invisible to CSS grid/flexbox
  • Snapshots innerHTML on mount and refreshes in onErrorCaptured (before state change)
  • Uses Vue's onErrorCaptured directly (not wrapping NuxtErrorBoundary)
  • Returns false from onErrorCaptured to stop error propagation
  • Frozen content has pointer-events: none with a ::after overlay using pointer-events: auto and cursor: not-allowed

Requirements

  • Vue 3.5+
  • Nuxt 3+ (optional, for module usage)