fix: exclude proload/core

This commit is contained in:
Nate Moore 2021-12-14 15:11:01 -06:00
parent bedb8cf82b
commit ec6c6169dc

View file

@ -2,7 +2,7 @@ import type { AstroConfig } from '../@types/astro';
import type { AstroDevServer } from './dev';
import type { LogOptions } from './logger';
import { builtinModules } from 'module';
import { builtinModules, createRequire } from 'module';
import { fileURLToPath } from 'url';
import vite from './vite.js';
import astroVitePlugin from '../vite-plugin-astro/index.js';
@ -12,11 +12,14 @@ import markdownVitePlugin from '../vite-plugin-markdown/index.js';
import jsxVitePlugin from '../vite-plugin-jsx/index.js';
import { resolveDependency } from './util.js';
const require = createRequire(import.meta.url);
// Some packages are just external, and thats the way it goes.
const ALWAYS_EXTERNAL = new Set([
...builtinModules.map((name) => `node:${name}`),
'@sveltejs/vite-plugin-svelte',
'@proload/core',
require.resolve('@proload/core'),
'@babel/core',
'babel-plugin-module-resolver',
'serialize-javascript',