
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
@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 285 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
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.