
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
@stencil/dev-server
Advanced tools
Development server for Stencil with DOM-based Hot Module Replacement (HMR).
npm install --save-dev @stencil/dev-server @stencil/core
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
start(config, logger, watcher?) — start the dev serverimport { 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();
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().
| 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) |
FAQs
Development server for Stencil with DOM-based HMR
The npm package @stencil/dev-server receives a total of 1,298 weekly downloads. As such, @stencil/dev-server popularity was classified as popular.
We found that @stencil/dev-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.