Home > @lynx-js/rspeedy > Dev
The Dev option is used to control the behavior related with development. Including: HMR, DevServer, etc.
Signature:
Property | Modifiers | Type | Description |
---|---|---|---|
assetPrefix? | string | boolean | undefined | (Optional) The Dev.assetPrefix is used to set the URL prefix for static assets during development. | |
client? | Client | undefined | (Optional) Configuration of the development client. | |
hmr? | boolean | undefined | (Optional) Whether to enable Hot Module Replacement (HMR). | |
liveReload? | boolean | undefined | (Optional) Whether to enable live reload functionality.Defaults to true.Live reload is used as a fallback when Dev.hmr is disabled or cannot be used in certain scenarios. When enabled, the page will automatically refresh when source files are changed.To completely disable both HMR and live reload, set both dev.hmr and dev.liveReload to false. Then, no WebSocket requests will be made to the dev server on the page, and the page will not automatically refresh when file changes. | |
progressBar? | boolean | { id?: string; } | undefined | (Optional) Whether to display progress bar during compilation.Defaults to true. | |
watchFiles? | WatchFiles | WatchFiles[] | undefined | (Optional) Watch specified files and directories for changes. When a file change is detected, it can trigger a page reload or restart the dev server. | |
writeToDisk? | boolean | ((filename: string) => boolean) | undefined | (Optional) Used to control whether the build artifacts of the development environment are written to the disk. |