diff options
| author | 2023-01-09 11:01:33 -0500 | |
|---|---|---|
| committer | 2023-01-09 10:01:33 -0600 | |
| commit | 762c95f747adc12f976bc4a1ec2f25ebff3b3ab8 (patch) | |
| tree | 416e3ce8a3853d04cab209eafe13bcbe1d5f4576 /packages/integrations/netlify/src | |
| parent | 3629923583513c6eea386d0600edbb5aadbca469 (diff) | |
| download | astro-762c95f747adc12f976bc4a1ec2f25ebff3b3ab8.tar.gz astro-762c95f747adc12f976bc4a1ec2f25ebff3b3ab8.tar.zst astro-762c95f747adc12f976bc4a1ec2f25ebff3b3ab8.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')
| -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 }); |
