Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// the bundle has been generated
dev && !nollup && serve({ spa }),
// Watch the `public` directory and refresh the
// browser on changes when not in production
useLiveReload && livereload('public'),
// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser(),
// Automatically create missing imported files. This helps keeping
// the HMR server alive, because Rollup watch tends to crash and
// hang indefinitely after you've tried to import a missing file.
hot &&
autoCreate({
include: 'src/**/*',
// Set false to prevent recreating a file that has just been
// deleted (Rollup watch will crash when you do that though).
recreate: true,
}),
hot &&
hmr({
public: 'public',
inMemory: true,
}),
],
watch: {
clearScreen: false,
},
}