diff options
author | 2021-03-15 15:51:36 -0400 | |
---|---|---|
committer | 2021-03-15 15:51:36 -0400 | |
commit | 01c34ac5d4a9da9e1a15222653b53620f0e48df6 (patch) | |
tree | 405771a8f8da8c008ca621fb4625155e2d472c8b /src | |
parent | aff6390cc79a09d2e413917912ff598e7f3d3c32 (diff) | |
download | astro-01c34ac5d4a9da9e1a15222653b53620f0e48df6.tar.gz astro-01c34ac5d4a9da9e1a15222653b53620f0e48df6.tar.zst astro-01c34ac5d4a9da9e1a15222653b53620f0e48df6.zip |
Prevent snowpaack from running on a port
Diffstat (limited to 'src')
-rw-r--r-- | src/dev.ts | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/dev.ts b/src/dev.ts index 3caf8e7f0..a9b785103 100644 --- a/src/dev.ts +++ b/src/dev.ts @@ -28,7 +28,7 @@ export default async function(astroConfig: AstroConfig) { }; } - const config = await loadConfiguration({ + const snowpackConfig = await loadConfiguration({ root: projectRoot.pathname, mount: { [hmxRoot.pathname]: '/_hmx', @@ -37,14 +37,20 @@ export default async function(astroConfig: AstroConfig) { plugins: [ ['hmx-v2/snowpack-plugin', hmxPlugOptions] ], - //exclude: [`${internalPath.pathname}**/*`], - devOptions: {open: 'none', output: 'stream'}, + devOptions: { + open: 'none', + output: 'stream', + port: 0 + }, packageOptions: { knownEntrypoints: ['preact-render-to-string'], external: ['@vue/server-renderer'] } }, snowpackConfigPath.pathname); - const snowpack = await startSnowpackServer({config, lockfile: null}); + const snowpack = await startSnowpackServer({ + config: snowpackConfig, + lockfile: null + }); const runtime = snowpack.getServerRuntime(); const server = http.createServer(async (req, res) => { |