Add SSR bundle minify config
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import isDevelopment from "./is-development";
|
||||
/**
|
||||
* Whether the SSR bundle should be minified.
|
||||
*
|
||||
* The SSR output is read off local disk by the server and is never downloaded
|
||||
* by a browser, so minifying it only costs build memory. Dev is never minified.
|
||||
* In production the bundle is minified unless `minify_ssr_bundle` is explicitly
|
||||
* set to `false` in `bunext.config.ts`.
|
||||
*/
|
||||
export default function shouldMinifySSR(params = {}) {
|
||||
if (isDevelopment())
|
||||
return false;
|
||||
return params.minify_ssr_bundle !== false;
|
||||
}
|
||||
Reference in New Issue
Block a user