serverless-components / website

:zap: Instantly deploy static website on serverless infrastructure with zero configuration using Serverless Components.
https://serverless.com
Apache License 2.0
157 stars 49 forks source link

Folders are not uploaded/created on S3 correctly. #7

Closed fodurrr closed 5 years ago

fodurrr commented 5 years ago

The folders are not uploaded/not created on S3. The folder names are merged into the filenames as string (flattened), therefore static assets are not displayed on the created website, worst case with create-react-app that application will not even start because static chunk JavaScript files are created in the static folder.

image

When I upload the static folder via the AWS console manually into the same bucket then everything works fine.

Probably the problem is here: websiteBucket.upload.

Btw where can i find this @serverless/aws-s3 package which has the websiteBucket.upload function on github? May be I could do a PR. Thanks

eahefnawy commented 5 years ago

@fodurrr are you using windows? does this PR fix the issue? https://github.com/serverless-components/aws-s3/pull/4

fodurrr commented 5 years ago

Yes I am on windows. My problem is not fixed yet but it is probably because website components has in the package.json old version of "@serverless/aws-s3": "^2.0.0" it should be updated.

Edit: Bumping @serverless/aws-s3 dependency to ^4.0.0 solves the problem.

eahefnawy commented 5 years ago

Thanks @fodurrr ... Merged and released