diff options
author | 2023-01-07 01:49:18 +0800 | |
---|---|---|
committer | 2023-01-06 12:49:18 -0500 | |
commit | 49ab4f231c23b34891c3ee86f4b92bf8d6d267a3 (patch) | |
tree | 6e1d8d699be17d2a9cfb13dabd57fdaaf5295a2a /scripts/memory | |
parent | 54d87af012e2b7f5176b95f3b23b46c83b5dc6b1 (diff) | |
download | astro-49ab4f231c23b34891c3ee86f4b92bf8d6d267a3.tar.gz astro-49ab4f231c23b34891c3ee86f4b92bf8d6d267a3.tar.zst astro-49ab4f231c23b34891c3ee86f4b92bf8d6d267a3.zip |
Remove proload for config loading (#5778)
* Refactor resolve and load config
* Add changeset
* Update name
* Remove unnecessary node_env handling
* Fix test
* Update comment
Diffstat (limited to 'scripts/memory')
-rw-r--r-- | scripts/memory/index.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/memory/index.js b/scripts/memory/index.js index 30cc1c0f2..8eaffb56b 100644 --- a/scripts/memory/index.js +++ b/scripts/memory/index.js @@ -1,7 +1,8 @@ import { fileURLToPath } from 'url'; import v8 from 'v8'; import dev from '../../packages/astro/dist/core/dev/index.js'; -import { loadConfig } from '../../packages/astro/dist/core/config.js'; +import { openConfig } from '../../packages/astro/dist/core/config.js'; +import { nodeLogDestination } from '../../packages/astro/dist/core/logger/node.js'; import prettyBytes from 'pretty-bytes'; if (!global.gc) { @@ -14,8 +15,13 @@ const isCI = process.argv.includes('--ci'); /** URL directory containing the entire project. */ const projDir = new URL('./project/', import.meta.url); -let config = await loadConfig({ +let { astroConfig: config } = await openConfig({ cwd: fileURLToPath(projDir), + logging: { + dest: nodeLogDestination, + level: 'error', + }, + cmd: 'dev', }); const telemetry = { |