Does anyone know if there is an easy way to “clone...
# help
d
Does anyone know if there is an easy way to “clone” and change certain aspects of a core construct Instance? I already have a cloudfront distro built in
sst.StaticSite
and I’d like to create a SECOND distro with a different domain and WAF but pointed at the same origin/bucket
d
I prefer to create common config objects, and use them in both places.
d
@Derek Kershner hmmmm….. ya… unfortnately, dont think that will work with the
sst.StaticSite
example since it adds a bunch of things to the distro, even if you pass it in
d
I solved this problem in
NextJsSite
by submitting a PR with static config objects on the construct that get used deeper, and then used them where I needed them.
Realistically, you either have to do something like this, or play horseshoes, imo.
d