Nuxt on AWS(Lambda + S3) with Serverless Framework.
Installation is done using the npm install
command:
npm i serverless-nuxt
npm i serverless serverless-nuxt-plugin -D
Check out our complete installation guide to setting up your project.
- Installation Guide
- Separation of development environment
- Use Custom URL instead of S3 Bucket URL
- Redirect www URLs to non-www
custom:
nuxt:
version: v${file(./package.json):version}
bucketName: my-nuxt-project-${self:provider.stage}
cdnPath:
assetsPath:
assetsCacheMaxAge:
Name | Description | Default |
---|---|---|
version (required) | version | |
bucketName (required) | AWS S3 Bucket Name for static files | |
cdnPath | CDN Path. If this value is not set, the default S3 route(https://${config.bucketName}.s3.amazonaws.com ) is used. |
null |
assetsPath | Path of assets created after nuxt build. | ".nuxt/dist/client" |
assetsCacheMaxAge | CacheControl MaxAge to use when uploading assets to S3. Using ms. | 365d |