Fix broken next release (#1652)

This commit is contained in:
Matthew Phillips 2021-10-25 12:55:26 -04:00 committed by GitHub
parent 7f95d706e9
commit 190e03b5ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,18 @@ import { getPackageJSON, parseNpmName } from './util.js';
const require = createRequire(import.meta.url); const require = createRequire(import.meta.url);
// Some packages are just external, and thats the way it goes. // Some packages are just external, and thats the way it goes.
const ALWAYS_EXTERNAL = new Set(['@sveltejs/vite-plugin-svelte', 'micromark-util-events-to-acorn', 'estree-util-value-to-estree', 'shorthash', 'unified']); const ALWAYS_EXTERNAL = new Set([
'@sveltejs/vite-plugin-svelte',
'micromark-util-events-to-acorn',
'estree-util-value-to-estree',
'prismjs',
'shorthash',
'unified'
]);
const ALWAYS_NOEXTERNAL = new Set([
// This is only because Vite's native ESM doesn't resolve "exports" correctly.
'astro'
]);
/* /*
* Tailwind fixes * Tailwind fixes
@ -70,7 +81,7 @@ export async function createVite(inlineConfig: ViteConfigWithSSR, { astroConfig,
/** Note: SSR API is in beta (https://vitejs.dev/guide/ssr.html) */ /** Note: SSR API is in beta (https://vitejs.dev/guide/ssr.html) */
ssr: { ssr: {
external: [...external, ...ALWAYS_EXTERNAL], external: [...external, ...ALWAYS_EXTERNAL],
noExternal: [...noExternal], noExternal: [...noExternal, ...ALWAYS_NOEXTERNAL],
}, },
}; };