Deploying Nuxt.js websites
Nuxt.js is a framework written for Vue applications which can either be used as a static site generator, or a framework to handle server side logic. You can easily host your Nuxt.js applications on Stormkit.
If you'd like to host your universal app on Stormkit, simply go to your application's build config. Click on My application > My environment > Edit
and specify the following fields in your build configuration:
|Entry file||Path to nuxt.config.js file.|
|Public folder||Path to nuxt folder. Please note that you have to specify the parent folder, not the dist folder within the nuxt folder. For instance, specify .nuxt and not `.nuxt/dist`.|
|Build command||The build command. If you're using the create-nuxt-app boilerplate, by default it is yarn build.|
Before deploying, we need to tell Nuxt.js to serve the static files from our CDN. Go ahead and update the nuxt.config.js
And that should be it. Click deploy and have your serverless Nuxt.js application up and running - ready to be served to millions of users.
There are a few places where Stormkit looks for dependencies to be bundled. These are:
- 1. bundledDependencies property inside package.json
- 2. modules property inside nuxt.config.js
- 3. packages required modules by nuxt.config.js (for instance by import or require statements).
All dependencies specified in one of these locations will be bundled in the deployment package together with your repository - except the .git
The deployment package will be zipped in order to be deployed to the lambda function. The zip file should not exceed 50mb
zipped, and 250mb
unzipped. These limits apply per deploy, not per app.
SPA mode / nuxt generate
Not specifying an entry file will tell Stormkit to serve your application from the CDN. Check here to see how to deploy a regular application.