rollup-plugin-serve
- Version 3.0.0
- Published
- 18.6 kB
- 2 dependencies
- MIT license
Install
npm i rollup-plugin-serveyarn add rollup-plugin-servepnpm add rollup-plugin-serveOverview
Serve your rolled up bundle
Index
Functions
function serve
serve: (options?: RollupServeOptions | string) => Plugin;Serve your rolled up bundle like webpack-dev-server
Interfaces
interface RollupServeOptions
interface RollupServeOptions {}property contentBase
contentBase?: string | string[];Serve static files from the specified folder(s).
property headers
headers?: | IncomingHttpHeaders | OutgoingHttpHeaders | { // i.e. Parameters<OutgoingMessage["setHeader"]> [name: string]: number | string | ReadonlyArray<string>; };Set custom response headers
property historyApiFallback
historyApiFallback?: boolean | string;Set to
trueto return index.html (200) instead of error page (404) or path to fallback page
property host
host?: string;Change the host of the server (default:
'localhost')
property https
https?: ServerOptions;By default server will be served over HTTP (https:
false). It can optionally be served over HTTPS.
property mimeTypes
mimeTypes?: TypeMap;Set custom mime types, usage https://github.com/broofa/mime#mimedefinetypemap-force--false
property onListening
onListening?: (server: Server) => void;Execute function after server has begun listening
property open
open?: boolean;Launch the browser after the first bundle is generated (default:
false)
property openPage
openPage?: string;Change the page that is opened when the browser is launched. Will not do anything if
open = false. Remember to start with a slash, e.g.'/different/page'
property port
port?: number | string;Change the port that the server will listen on (default:
10001)
property verbose
verbose?: boolean;Show server address in console (default:
true)
Package Files (1)
Dependencies (2)
Dev Dependencies (4)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rollup-plugin-serve.
- Markdown[](https://www.jsdocs.io/package/rollup-plugin-serve)
- HTML<a href="https://www.jsdocs.io/package/rollup-plugin-serve"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2226 ms. - Missing or incorrect documentation? Open an issue for this package.
