Last active
October 21, 2022 01:30
-
-
Save wcheek/b8e26ca79127ff3c44481bc17179fc5c to your computer and use it in GitHub Desktop.
Trying to bundle web app locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s3_deploy.BucketDeployment( | |
scope=self, | |
id="websiteDeploy", | |
sources=[ | |
s3_deploy.Source.asset( | |
path="website", | |
bundling=BundlingOptions( | |
command=[ | |
"bash", | |
"-c", | |
[ | |
" && ".join( | |
[ | |
"npm install vite", | |
"npm run build", | |
"cp -r /asset-input/dist/* /asset-output/", | |
] | |
) | |
], | |
], | |
image=DockerImage.from_registry("node:lts"), | |
## INCORRECT IMPLEMENTATION | |
local=ILocalBundling.try_bundle( | |
command=[ | |
"bash", | |
"-c", | |
[ | |
" && ".join( | |
[ | |
"npm install vite", | |
"npm run build", | |
"cp -r /asset-input/dist/* /asset-output/", | |
] | |
) | |
], | |
], | |
), | |
), | |
) | |
], | |
destination_bucket=bucket, | |
distribution=distribution, | |
distribution_paths=["/*"], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment