fix(check): Dynamically import check command (#6717)
This commit is contained in:
parent
9cc7329759
commit
c2d4ae1cbe
2 changed files with 7 additions and 1 deletions
5
.changeset/eight-stingrays-pull.md
Normal file
5
.changeset/eight-stingrays-pull.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Dynamically import check command to improve startup speed and prevent Astro from crashing due to language-server stuff
|
|
@ -18,7 +18,6 @@ import { enableVerboseLogging, nodeLogDestination } from '../core/logger/node.js
|
|||
import { formatConfigErrorMessage, formatErrorMessage, printHelp } from '../core/messages.js';
|
||||
import * as event from '../events/index.js';
|
||||
import { eventConfigError, eventError, telemetry } from '../events/index.js';
|
||||
import { check } from './check/index.js';
|
||||
import { openInBrowser } from './open.js';
|
||||
|
||||
type Arguments = yargs.Arguments;
|
||||
|
@ -228,6 +227,8 @@ async function runCommand(cmd: string, flags: yargs.Arguments) {
|
|||
}
|
||||
|
||||
case 'check': {
|
||||
const { check } = await import('./check/index.js');
|
||||
|
||||
// We create a server to start doing our operations
|
||||
const checkServer = await check(settings, { flags, logging });
|
||||
if (checkServer) {
|
||||
|
|
Loading…
Reference in a new issue