15 lines
536 B
JavaScript
15 lines
536 B
JavaScript
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;
|
|
}
|