diff options
author | 2023-01-09 11:01:33 -0500 | |
---|---|---|
committer | 2023-01-09 10:01:33 -0600 | |
commit | f8f4d49aba642714c2abe5e430f1a336ae1ae859 (patch) | |
tree | 165a0f181d80ce76e5aeb708a70fd2f48276af97 /packages/integrations/netlify/src/integration-edge-functions.ts | |
parent | 7572f7402238da37de748be58d678fedaf863b53 (diff) | |
download | astro-f8f4d49aba642714c2abe5e430f1a336ae1ae859.tar.gz astro-f8f4d49aba642714c2abe5e430f1a336ae1ae859.tar.zst astro-f8f4d49aba642714c2abe5e430f1a336ae1ae859.zip |
Output assets to `_astro` directory (#5772)
* WIP: emit assets to _astro
* chore: better _astro handling
* refactor: emit server assets to `chunks/`
* chore: update /asset tests
* test: add explicit build output tests
* fix: update image to emit to configured asset path
* chore: update changeset
* chore: update image tests
* chore: update image tests
* test: update css test
* test: update bundling test
* test: update tests
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* chore: add clarifying comment
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Diffstat (limited to 'packages/integrations/netlify/src/integration-edge-functions.ts')
-rw-r--r-- | packages/integrations/netlify/src/integration-edge-functions.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/integrations/netlify/src/integration-edge-functions.ts b/packages/integrations/netlify/src/integration-edge-functions.ts index 48be316d9..a05f8f3a0 100644 --- a/packages/integrations/netlify/src/integration-edge-functions.ts +++ b/packages/integrations/netlify/src/integration-edge-functions.ts @@ -10,6 +10,7 @@ interface BuildConfig { server: URL; client: URL; serverEntry: string; + assets: string; } const SHIM = `globalThis.process = { @@ -100,7 +101,7 @@ async function bundleServerEntry({ serverEntry, server }: BuildConfig, vite: any // Remove chunks, if they exist. Since we have bundled via esbuild these chunks are trash. try { const chunkFileNames = - vite?.build?.rollupOptions?.output?.chunkFileNames ?? 'assets/chunks/chunk.[hash].mjs'; + vite?.build?.rollupOptions?.output?.chunkFileNames ?? `chunks/chunk.[hash].mjs`; const chunkPath = npath.dirname(chunkFileNames); const chunksDirUrl = new URL(chunkPath + '/', server); await fs.promises.rm(chunksDirUrl, { recursive: true, force: true }); |