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

@stencil/dev-server

v5.0.0-alpha.28

Published

Development server for Stencil with DOM-based HMR

Readme

@stencil/dev-server

Development server for Stencil with DOM-based Hot Module Replacement (HMR).

Install

npm install --save-dev @stencil/dev-server @stencil/core

Usage

The dev server is configured via stencil.config.ts and started automatically with stencil build --dev --watch --serve.

// stencil.config.ts
import { Config } from '@stencil/core';

export const config: Config = {
  devServer: {
    port: 3333,
    openBrowser: true,
    reloadStrategy: 'pageReload', // or 'hmr'
  },
  outputTargets: [{ type: 'www' }],
};
npx stencil build --dev --watch --serve

Programmatic API

start(config, logger, watcher?) — start the dev server

import { start } from '@stencil/dev-server';
import { createNodeLogger } from '@stencil/core/sys/node';

const server = await start(
  {
    root: './www',       // directory to serve
    port: 3333,
    openBrowser: true,
    reloadStrategy: 'hmr', // 'hmr' | 'pageReload' | null
  },
  createNodeLogger(),
);

console.log(`Listening at ${server.browserUrl}`);

// Shut down when done
await server.close();

With a Stencil compiler watcher (full HMR)

Pass a CompilerWatcher to connect build output to the dev server — file changes trigger HMR or a page reload automatically.

import * as coreCompiler from '@stencil/core/compiler';
import { start } from '@stencil/dev-server';
import { createNodeLogger, createNodeSys } from '@stencil/core/sys/node';

const logger = createNodeLogger();
const sys = createNodeSys();

const { config } = await coreCompiler.loadConfig({
  configPath: './stencil.config.ts',
  logger,
  sys,
});

const compiler = await coreCompiler.createCompiler(config);
const watcher = await compiler.createWatcher();

const server = await start(
  { root: './www', port: 3333, reloadStrategy: 'hmr' },
  logger,
  watcher,
);

// Start watching — builds trigger HMR updates in the browser
await watcher.start();

// To shut down:
// await watcher.close();
// await server.close();

The returned DevServer exposes address, browserUrl, protocol, port, root, and close().

Key config options

| Option | Default | Description | |---|---|---| | root | '.' | Directory to serve files from | | port | 3333 | Port to listen on | | address | '0.0.0.0' | Network interface to bind | | reloadStrategy | 'hmr' | 'hmr', 'pageReload', or null to disable | | openBrowser | false | Open browser on start | | https | — | { cert, key } to enable HTTPS | | worker | true | Fork server into a child process (disable for debugging) | | ssr | false | Server-side render each page on request (dev only - you must have a ssr output target setup) |