Resolve vite client modules to vendored vite (#1903)

* Resolve vite client modules to vendored vite

* Adds a changeset
This commit is contained in:
Matthew Phillips 2021-11-19 10:23:04 -05:00 committed by GitHub
parent fb4eb080ec
commit 41c6a772a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix for dev server not starting

View file

@ -2996,9 +2996,9 @@ const NULL_BYTE_PLACEHOLDER = `__x00__`;
const CLIENT_PUBLIC_PATH = `/@vite/client`;
const ENV_PUBLIC_PATH = `/@vite/env`;
// eslint-disable-next-line node/no-missing-require
const CLIENT_ENTRY = require.resolve('vite/dist/client/client.mjs');
const CLIENT_ENTRY = require.resolve('../../client/client.mjs');
// eslint-disable-next-line node/no-missing-require
const ENV_ENTRY = require.resolve('vite/dist/client/env.mjs');
const ENV_ENTRY = require.resolve('../../client/env.mjs');
const CLIENT_DIR = path__default.dirname(CLIENT_ENTRY);
// ** READ THIS ** before editing `KNOWN_ASSET_TYPES`.
// If you add an asset to `KNOWN_ASSET_TYPES`, make sure to also add it