Skip to content

Commit

Permalink
feature: upgrade Astro to v5 beta (#189)
Browse files Browse the repository at this point in the history
# Changes

- Upgrade Astro to the version 5 beta

# Associated issue

Resolves #188

# How to test

1. Open preview link
2. See if it works
3. Check code mainly

# Checklist

- [x] I have performed a self-review of my own code
- [x] I have made sure that my PR is easy to review (not too big,
includes comments)
- ~~I have made updated relevant documentation files (in project README,
docs/, etc)~~
- ~~I have added a decision log entry if the change affects the
architecture or changes a significant technology~~
- [x] I have notified a reviewer

<!-- Please strike through and check off all items that do not apply
(rather than removing them) -->
  • Loading branch information
luukbrauckmann authored Oct 2, 2024
1 parent 2e3557d commit a622bd9
Show file tree
Hide file tree
Showing 7 changed files with 3,677 additions and 3,918 deletions.
48 changes: 23 additions & 25 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,28 @@ export default defineConfig({
enabled: true,
},
}),
experimental: {
env: {
schema: {
DATOCMS_READONLY_API_TOKEN: envField.string({
context: 'server',
access: 'secret',
default: process.env.DATOCMS_READONLY_API_TOKEN
}),
HEAD_START_PREVIEW_SECRET: envField.string({
context: 'server',
access: 'secret',
default: process.env.HEAD_START_PREVIEW_SECRET
}),
HEAD_START_PREVIEW: envField.boolean({
context: 'server',
access: 'secret',
default: isPreview
}),
PUBLIC_IS_PRODUCTION: envField.boolean({
context: 'server',
access: 'public',
default: process.env.NODE_ENV === 'production'
})
}
env: {
schema: {
DATOCMS_READONLY_API_TOKEN: envField.string({
context: 'server',
access: 'secret',
default: process.env.DATOCMS_READONLY_API_TOKEN
}),
HEAD_START_PREVIEW_SECRET: envField.string({
context: 'server',
access: 'secret',
default: process.env.HEAD_START_PREVIEW_SECRET
}),
HEAD_START_PREVIEW: envField.boolean({
context: 'server',
access: 'secret',
default: isPreview
}),
PUBLIC_IS_PRODUCTION: envField.boolean({
context: 'server',
access: 'public',
default: process.env.NODE_ENV === 'production'
})
}
},
image: {
Expand All @@ -53,7 +51,7 @@ export default defineConfig({
service: passthroughImageService()
},
integrations: [sitemap()],
output: isPreview ? 'server' : 'hybrid',
output: isPreview ? 'server' : 'static',
server: { port: localhostPort },
site: siteUrl,
trailingSlash: 'always',
Expand Down
Loading

0 comments on commit a622bd9

Please sign in to comment.