Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The base flag from the astro config is ignored completely #5

Open
feldspar9s opened this issue Jan 10, 2025 · 0 comments
Open

The base flag from the astro config is ignored completely #5

feldspar9s opened this issue Jan 10, 2025 · 0 comments

Comments

@feldspar9s
Copy link

Description

astro-sst should consume the base flag specified in the astro.config.mjs file and use it to determine the subdirectory/prefix of the static assets in the s3 bucket, as well as the pathPattern for both the regionalServer and the staticServer.


Current Behavior

The base flag in the astro config is ignored while the static assets are pushed to s3, and when the behaviors are added to cloudfront

  • Example astro.config.mjs file:
// @ts-check
import { defineConfig } from 'astro/config';
import aws from "astro-sst";

export default defineConfig({
 output: "server",
 base: '/home',
 adapter: aws()
});
  • The resulting s3 keys :
bucket_root
├── _astro/*
├── favicon.svg
└── index.html
  • The resulting cloudfront behaviors
Origin Path Pattern
staticsServer _astro/*
regionalServer _image

Expected Behavior

The base flag should be used to prefix both the object keys in s3 and the pathPatterns in cloudfront

  • Expected s3 keys:
bucket_root
├── home
│   ├── _astro/*
│   ├── favicon.svg
└   └── index.html
  • Expected cloudfront behaviors:
Origin Path Pattern
staticsServer /home/_astro/*
regionalServer /home/_image

Details

  • Tested on: 10th Jan 2025
  • Astro version : 5.1.3
  • astro-sst version: 2.45.2
  • sst version: 3.5.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant