Nollup Options

May 11, 2022 ยท View on GitHub

This list provides a description of all of the options for the CLI, dev server and dev middleware. See their respective pages for the exact options each of them support.

TypeNameDescription
String|ObjectconfigPass a Rollup configuration file. By default it will look for rollup.config.js but can be specified otherwise. If object is supported, can receive Rollup config object.
StringrcPass a Nollup configuration file. By default it will look for one of .nolluprc, .nolluprc.js.
StringcontentBaseFolder to serve static content from. Typically the content would contain additional resources like images. By default it will be looking in ./.
BooleanhotEnable Hot Module Replacement. Default is false.
NumberportPort number to run server on. Default is 8080.
Boolean|StringhistoryApiFallbackIf set to true, it will fallback to index.html if accessing a file that doesn't exist. You can pass a string to fallback to a different file. Default is false.
StringpublicPathAll generated files will be served from this URL. Default is /
StringenvironmentPass environment variables that are set to process.ENV.
ObjectproxyObject keys are paths to match. Value can be the domain to proxy to. "api": "http://localhost:8080" will have a request such as /api/todos proxy to http://localhost:8080/api/todos. In addition the value can be an object with host key for domain and any additional configurations that express-http-proxy consumes. "api": {host: 'http://localhost:8080", changeOrigin: true} will have a request such as /api/todos proxy to http://localhost:8080/api/todos with changeOrigin flag set to true.
BooleanverboseEnable verbose logging. Default is false.
ObjectheadersProvide custom headers for Express server responses. Useful to set cors headers for the server.
StringhmrHostHost to connect to for HMR. Default is window.location.host. Useful for Electron environments.
StringhostSpecify the host to use. Default is localhost. Useful for allowing remote connections, eg. 0.0.0.0
FunctionbeforeReceives Express app as argument. You can inject custom middleware before Nollup dev middleware.
FunctionafterReceives Express app as argument. You can inject custom middleware after Nollup dev middleware.
BooleanhttpsEnable https. Default is false. Requires key and cert to be set
StringkeyPath to the private key file to use with https.
StringcertPath to the certificate file to use with https.
String|BooleanliveBindingsEnable live-bindings. Default is false. Supports "with-scope" or "reference". If set to true, it will use "reference". See Live Bindings for more information.
String|String[]configPluginParse the config file using the provide plugin. Can pass array of plugins as well.