Skip to content

Commit 82b753a

Browse files
briandadams85claude
andcommitted
fix: downgrade Astro to 6.1.2 to fix Netlify build failure
Astro 6.1.3 introduced a bug (withastro/astro#16196, #16209) in the pluginChunkImports plugin that corrupts dynamic import specifiers on Netlify/Linux builds when DEPLOY_ID is set. This causes esbuild to fail with syntax errors on unresolved Rollup hash placeholders. The fix (withastro/astro#16207) has not been released yet. Pinning to 6.1.2 avoids the regression and removes the minification workaround. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 14fd9a8 commit 82b753a

4 files changed

Lines changed: 8 additions & 24 deletions

File tree

astro.config.mjs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,6 @@ export default defineConfig({
2323
prefetch: {
2424
prefetchAll: true
2525
},
26-
vite: {
27-
plugins: [{
28-
// Astro hardcodes minify: true for the client environment build,
29-
// and Vite uses esbuild for minification during Rollup's renderChunk
30-
// phase — before hash placeholders are resolved. On Netlify's Linux
31-
// build, esbuild fails on the unresolved placeholders in chunk names.
32-
// This plugin forces minify: false for the client build; Netlify
33-
// post-processing handles JS minification on the final output instead.
34-
name: 'disable-client-minify',
35-
configEnvironment(name, config) {
36-
if (name === 'client') {
37-
config.build ??= {};
38-
config.build.minify = false;
39-
}
40-
}
41-
}],
42-
},
4326
integrations: [vue(), mdx(), sitemap(), sentry({
4427
dsn: "https://c0923b76e81cff946429e3533e2a3ff1@o4506892850233344.ingest.us.sentry.io/4506892851806208",
4528
sourceMapsUploadOptions: {

netlify.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
skip_processing = false
77

88
[build.processing.css]
9-
bundle = false
9+
bundle = true
1010
minify = true
1111

1212
[build.processing.js]
13-
bundle = false
13+
bundle = true
1414
minify = true
1515

1616
[build.processing.images]

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@webcomponents/template-shadowroot": "0.2.1",
3434
"alpinejs": "3.15.8",
3535
"animate.css": "4.1.1",
36-
"astro": "^6.1.5",
36+
"astro": "^6.1.2",
3737
"astro-capo": "0.0.1",
3838
"astro-pagefind": "^1.8.6",
3939
"astro-seo": "1.1.0",

0 commit comments

Comments
 (0)