Package Exports
- @11ty/eleventy-dev-server
- @11ty/eleventy-dev-server/server.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@11ty/eleventy-dev-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eleventy-dev-server πβ‘οΈππ
A minimal, modern, generic, hot-reloading local web server to help web developers.
β‘ Documentation
- Please star Eleventy on GitHub!
- Follow us on Twitter @eleven_ty
- Support 11ty on Open Collective
- 11ty on npm
- 11ty on GitHub
Installation
This is bundled with @11ty/eleventy (and you do not need to install it separately) in Eleventy v2.0.
CLI
Eleventy Dev Server now also includes a CLI. The CLI is for standalone (non-Eleventy) use only: separate installation is unnecessary if youβre using this server with @11ty/eleventy.
npm install -g @11ty/eleventy-dev-server
# Alternatively, install locally into your project
npm install @11ty/eleventy-dev-serverThis package requires Node 14 or newer.
CLI Usage
# Serve the current directory
npx @11ty/eleventy-dev-server
# Serve a different subdirectory (also aliased as --input)
npx @11ty/eleventy-dev-server --dir=_site
# Disable the `domdiff` feature
npx @11ty/eleventy-dev-server --domdiff=false
# Full command list in the Help
npx @11ty/eleventy-dev-server --helpTests
npm run test- We use the ava JavaScript test runner (Assertions documentation)