ES Dev Server (version 2.1.0, though the project itself has seen its main development move to a new name) is a development server designed for modern web applications that leverage native ES modules directly in the browser, thereby eliminating the need for a separate bundling step during development. It offers features like efficient browser caching for fast reloads, on-demand code transformation for older browser compatibility, resolution of bare module imports (`--node-resolve`), and automatic browser reloading on file changes (`--watch`). Its key differentiator lies in promoting a "no-build" development workflow. While it remains functional and receives bug fixes, new development and active feature work have moved to its successor, `@web/dev-server`. Users are generally advised to use `@web/dev-server` for new projects and consider migrating existing ones.
npm install es-dev-serverVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up `es-dev-server` to serve a simple HTML file with native ES module imports, using `npm scripts` for easy execution and `--node-resolve` for bare module support.
Migrate your project from `es-dev-server` to `@web/dev-server` following the official migration guides provided by the Open Web Components project. Ensure you update your `package.json` dependencies and server configuration.
Ensure your Node.js installation is version 10 or greater. Use a Node Version Manager (like `nvm`) to easily switch or update your Node.js environment.
Accept the self-signed certificate in your browser for local development. For more permanent solutions or different environments, you may need to configure `es-dev-server` to use trusted SSL certificates.
Carefully review the documentation for `node-resolve` and `compatibility` options. Enable `--node-resolve` if you are using bare module specifiers. Adjust `--compatibility` based on your target browser support matrix to avoid over-transpiling or missing necessary polyfills.
Run `npm install --save-dev es-dev-server` to install the package. If running via CLI, ensure you use `npx es-dev-server` or define it as a script in `package.json` (e.g., `"start": "es-dev-server ..."`).
Change the port `es-dev-server` listens on using the `--port` flag (e.g., `es-dev-server --port 8001`) or by modifying your configuration file. Alternatively, identify and terminate the process currently occupying the port.
Rewrite the problematic file to use ES module `import` syntax instead of `require()`. Ensure your `package.json` `type` field is correctly set, or use appropriate file extensions (e.g., `.cjs` for CommonJS, `.mjs` for ESM).
No dependency data recorded yet.