@web/dev-server
@web/dev-server
npm i @web/dev-server
@web/dev-server

@web/dev-server

Guides, tools and libraries for modern web development.

by modernweb-dev

0.1.34 (see all)License:MITTypeScript:Built-In
npm i @web/dev-server
Readme

Web Dev Server

Dev Server for web applications, ideal for buildless es module workflows. Optionally supports simple code transformations.

  • Efficient browser caching for fast reloads
  • Transform code on older browsers for compatibility
  • Resolve bare module imports for use in the browser (--node-resolve)
  • Auto-reload on file changes with the (--watch)
  • History API fallback for SPA routing (--app-index index.html)
  • Plugin and middleware API for extensions
  • Powered by esbuild and rollup plugins

Web Dev server is the successor of es-dev-server

See our website for full documentation.

Installation

Install the dev server:

npm i --save-dev @web/dev-server

Basic commands

Start the dev server:

web-dev-server --node-resolve --open
wds --node-resolve --open

Run in watch mode, reloading on file changes:

web-dev-server --node-resolve --watch --open
wds --node-resolve --watch --open

Use history API fallback for SPA routing:

web-dev-server --node-resolve --app-index demo/index.html --open
wds --node-resolve --app-index demo/index.html --open

Transform JS to a compatible syntax based on user agent:

web-dev-server --node-resolve --open --esbuild-target auto
wds --node-resolve --open --esbuild-target auto

Example projects

Check out the example projects for a fully integrated setup.

Documentation

See our website for full documentation.

Downloads/wk

37.8K

GitHub Stars

1.5K

LAST COMMIT

5mos ago

MAINTAINERS

7

CONTRIBUTORS

101

OPEN ISSUES

209

OPEN PRs

31
VersionTagPublished
0.1.34
latest
4d ago
0.0.0-canary-202171510195
canary
1yr ago
0.1.20-next.0
next
1yr ago
No alternatives found
No tutorials found
Add a tutorial