boolean | ((filename: string) => boolean)
(file) => !file.includes('.hot-update.')
Used to control whether the build artifacts of the development environment are written to the disk.
You can choose to save the build artifacts in the memory of the dev server, thereby reducing the overhead caused by file operations.
Simply set the dev.writeToDisk
option to false
:
You can also set dev.writeToDisk
to a function to match only certain files. When the function returns false
, the file will not be written; when it returns true
, the file will be written to disk.
For example, Modern.js by default write files to disk while excluding hot-update temporary files: