Static GitHub Issues

[2575] Build minimal Node.js app without Nuxt dependency

prev: render function or template not defined in component: anonymous
next: Invalid vendor error when upgraded from 1.0.0 to 1.1.0

Right now a production build weighs 100+ megabytes even for the simplest Nuxt application. I wonder if there's a way to create smaller deployments.

What I'm looking for is a way to build a web app:

  • that's a simple Node application (that can be started with $ node main.js or something alike)
  • that contains all the files required (images, static files, etc.)
  • that doesn't depend on Nuxt or any development package
  • that optionally doesn't include the original client-side JS source, only the packed bundle
  • but still does everything that a Nuxt application does.

I come from Meteor, which does something similar via meteor build.

The reason I'm curious is that smaller packages make Docker-based build/distribute/deploy pipelines faster, also I believe deploying unnecessary dependencies (eg. Babel transpilers) increase the attack surface, too.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2243">#c2243</a>)</em></sub></div>