From 603e137001826030e40fab0383c622e0859fdfd7 Mon Sep 17 00:00:00 2001 From: Puru Vijay Date: Fri, 3 Feb 2023 01:44:41 +0530 Subject: [PATCH] Externalise sourcemap-codec --- sites/svelte.dev/vite.config.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sites/svelte.dev/vite.config.js b/sites/svelte.dev/vite.config.js index 69c3bdcb93..981f629ad9 100644 --- a/sites/svelte.dev/vite.config.js +++ b/sites/svelte.dev/vite.config.js @@ -1,8 +1,10 @@ -import * as fs from 'fs'; import { sveltekit } from '@sveltejs/kit/vite'; +import * as fs from 'fs'; import { imagetools } from 'vite-imagetools'; -process.env.VITE_API_BASE = process.env.DOCS_PREVIEW ? 'http://localhost:8787' : 'https://api.svelte.dev'; +process.env.VITE_API_BASE = process.env.DOCS_PREVIEW + ? 'http://localhost:8787' + : 'https://api.svelte.dev'; function raw(ext) { return { @@ -20,6 +22,11 @@ function raw(ext) { const config = { logLevel: 'info', plugins: [raw(['.ttf']), imagetools(), sveltekit()], + build: { + rollupOptions: { + external: ['sourcemap-codec'], + }, + }, optimizeDeps: { include: [ 'codemirror',