fix: refine SSR configuration based on self-hosted environment and simplify external dependencies
This commit is contained in:
@@ -4,7 +4,7 @@ import { PUBLIC_IS_SELFHOSTED } from '$env/static/public';
|
|||||||
import { getBaseMetaTags } from '$lib/utils/functions/metaTags';
|
import { getBaseMetaTags } from '$lib/utils/functions/metaTags';
|
||||||
import { getOrgSiteInfo } from '$features/app/layout-setup';
|
import { getOrgSiteInfo } from '$features/app/layout-setup';
|
||||||
|
|
||||||
export const ssr = true;
|
export const ssr = PUBLIC_IS_SELFHOSTED === 'true' ? false : true;
|
||||||
|
|
||||||
interface LoadOutput {
|
interface LoadOutput {
|
||||||
orgSiteName: string;
|
orgSiteName: string;
|
||||||
|
|||||||
@@ -20,14 +20,7 @@ export default ({ mode }) => {
|
|||||||
sourcemap: false
|
sourcemap: false
|
||||||
},
|
},
|
||||||
ssr: {
|
ssr: {
|
||||||
noExternal: [
|
noExternal: ['svelte-sonner', 'layerchart', 'svelte-toolbelt']
|
||||||
'svelte-sonner',
|
|
||||||
'layerchart',
|
|
||||||
'svelte-toolbelt',
|
|
||||||
'intl-messageformat',
|
|
||||||
'@formatjs/icu-messageformat-parser',
|
|
||||||
'@sveltekit-i18n/parser-icu'
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
entries: ['src/routes/**/+*.{js,ts,svelte}'],
|
entries: ['src/routes/**/+*.{js,ts,svelte}'],
|
||||||
|
|||||||
Reference in New Issue
Block a user