Open Depaa opened 2 months ago
That's strange, what are you setting the path to for it to work? Is that where your site is?
Can you share your static site definition?
@jayair which definition?
This is the code: new sst.aws.StaticSite("MyWeb");
Version: sst 3.0.75.
I don't have other resources, it's really that basic.
What does your project structure look like? Or if it's pretty simple, give me the steps to reproduce?
Yeah sure. I took the example here: https://github.com/sst/ion/tree/dev/examples/aws-static-site
I removed the "path" and changed the name: "aws-static-site"
.
Nothing more
Oh I see. Yeah I think the way it's structured right now it probably needs a target folder that it can bundle.
I'll add that to the docs.
Is it possible to remove that target folder?
In my use case, which I imagine it's pretty common, I have a backend repo and a frontend repo. My backend has the S3 StaticSite. With the current behavior, every time I deploy the backend, it deletes the frontend files (therefore I need to deploy the frontend project)
Hmm yeah I guess we could. Most static site builders generate their output to some sub directory which is why target works that way.
Are you building your static site right now? Or is it a straight upload?
Hmm yeah I guess we could. Most static site builders generate their output to some sub directory which is why target works that way.
Yeah that works perfectly for a mono repo or a full stack, and I see myself using it :)
Are you building your static site right now? Or is it a straight upload?
Already built it. I was just wondering if there was the possibility to remove the "path" so we could have a 1 liner construct for the S3 + Cloudfront
Yeah let's take a look.
Hello,
when running this command:
it doesn't deploy the static site. It works only if I specify the "path"
logs with verbose: