
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
@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 187 weekly downloads. As such, @stencil/dev-server popularity was classified as not 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
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.