Comments (4)
One more,
serverless.yml
package:
exclude:
- assets/**
- components/**
- pages/**
- node_modules/**/*.ts
- node_modules/**/*.ts.map
- node_modules/**/*.js.map
- node_modules/**/*.css.map
from serverless-nuxt.
in my case,
.serverless
directory
cloudformation-template-create-stack.json
cloudformation-template-update-stack.json (or not)
serverless-state.json
project-name.zip
.serverless/project-name.zip
directory
.next/**
node_modules/**
...(nuxt root directories like below)...
assets/**
modules/**
pages/**
plugins/**
package.json
package-lock.json
nuxt.config.js
handler.js (lambda entry file)
from serverless-nuxt.
If it exceeds 110MB, it is most likely a font or image.
All static files created after webpack build in the plugin are uploaded to s3.
- When installing font or image related packages by npm, run it with the `--dev` option.
- If you use image or font files under
/static
, please move them all under/assets
. And when using in vue, please use the path using webpack.
Example in CSS
.something {
background-image: url(~assets/images/something.png);
}
Example in Vue
<template>
<!-- (X) -->
<!-- <img src="/static/something.png" /> -->
<!-- (O) -->
<img :src="require('~/assets/images/something.png')" />
</template>
from serverless-nuxt.
@hmaesta the issue with many of these Nuxt lambda helpers is they don't seem to be tested with real world applications of a reasonable size. If you add a bunch of deps that are huge but tree-shaken small during a nuxt build, you still can't upload your package to Lambda because it contains the raw non tree-shaken node_modules versions which quickly hit the 50MB Lambda@Edge limit on any reasonably complex project.
from serverless-nuxt.
Related Issues (20)
- [HELP] error undefined HOT 6
- Deployment works but page fails due to CORS errors on static assets like favicon/manifest HOT 6
- PWA install web app in not coming in the browser HOT 1
- serverless.yml can't get environment variable
- TypeError: Plugin is not a constructor HOT 2
- it's not supported Nuxt Typescript HOT 3
- Getting 404 all the time HOT 1
- `cdnPath` on the built seems to not work as expected. HOT 5
- Feature suggestion: A way to bypass the Nuxt build HOT 2
- Asset files not automatically uploading to S3 bucket HOT 11
- Nuxt Serverless with the Nuxt Content Documentation Theme - Cannot use import statement outside a module HOT 1
- Issue after refreshing page on route HOT 1
- Nuxt PWA module not working HOT 3
- Dependency Dashboard
- Should ACL option be excluded if cdnPath is specified?
- Access Denied error with no details
- Nuxt build process goes into infinite loop
- Demo for https://serverless-nuxt.dist.be/ has been 500 Internal server error
- Is this project still supported? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-nuxt.