Closed WayneHiller closed 2 years ago
For instance, if you are using create-react-app, you can edit the script scripts/start.js
, and call ThemesGeneratorPlugin.clearTemp
in the server shutdown function.
['SIGINT', 'SIGTERM'].forEach((sig) => {
process.on(sig, () => {
ThemesGeneratorPlugin.clearTemp();
devServer.close();
process.exit();
});
});
ThemesGeneratorPlugin.clearTemp It will delete temp directory. You can call the method as needed, e.g. when you stop webpack-dev-server in development mode.
Do you have an example of how to do this?