Deployment
Building the library and deploying a Nuxt app that uses it.
This page covers building adminlte-vue and shipping a Nuxt app to production — Nitro presets (Node, Vercel, Netlify, Cloudflare), Docker, and the .env / runtimeConfig basics.
Building the library
packages/adminlte-vue is built with Vite library mode. The output is ESM-only with two entries — index (.) and plugins (./plugins) — so the heavy plugin libs stay out of the default import. build.minify is intentionally off: the library ships readable ESM and lets the consuming app minify (it also sidesteps an esbuild lib-mode identifier collision).
pnpm install # install all workspace deps
pnpm build # build packages/* in order (lib → nuxt module)
pnpm --filter adminlte-vue build # just the library (vite build + dts + copy-css)
The build does three things:
@vitejs/plugin-vuecompiles the<script setup lang="ts">SFCs.vite-plugin-dts(viavue-tsc) emits the.d.tstree fromsrc/**.- A
closeBundlehook copiesadmin-lte/dist/css/adminlte.cssandadminlte.rtl.cssintodist/css/, exposed as the./cssand./css/rtlpackage exports.
Peer libraries (vue, bootstrap, apexcharts, tabulator-tables, quill, flatpickr, tom-select, sortablejs, jsvectormap, overlayscrollbars, @fullcalendar/*) are external — never bundled. The consuming app installs the ones it uses.
Building a Nuxt app
A Nuxt app using @adminlte/nuxt compiles to a standard Nitro server. After editing the library, rebuild it (or keep pnpm --filter adminlte-vue dev running) so the app picks up the change.
pnpm build:demo # production build of apps/demo
node apps/demo/.output/server/index.mjs # run the SSR server (honors HOST / PORT)
The Nitro output under .output/ is self-contained — only that directory is needed at runtime.
Nitro presets
By default Nuxt builds with the node-server preset, which produces the .output/server/index.mjs entry above (honors HOST and PORT). Vercel, Netlify and Cloudflare are auto-detected in their CI environments; otherwise set the preset explicitly in nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@adminlte/nuxt'],
// Pick the preset for your host:
nitro: { preset: 'node-server' }, // or 'vercel', 'netlify', 'cloudflare-pages'
})
| Preset | Target | Notes |
|---|---|---|
node-server | Any Node host / Docker | Default. Runs node .output/server/index.mjs. |
vercel | Vercel | Auto-detected in Vercel CI. |
netlify | Netlify | Auto-detected in Netlify CI. |
cloudflare-pages | Cloudflare Pages | Set explicitly or via Cloudflare's Nuxt support. |
You can also set the preset without editing config via the NITRO_PRESET environment variable at build time.
Docker
A standalone Nuxt app that depends on adminlte-vue + @adminlte/nuxt deploys with a standard
multi-stage Dockerfile — build, then ship only the self-contained .output:
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY . .
RUN pnpm install --frozen-lockfile
RUN pnpm build
FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production HOST=0.0.0.0 PORT=3000
COPY --from=build /app/.output ./.output
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]
docker build -t my-admin .
docker run -p 3000:3000 my-admin
Environment & runtimeConfig
Configuration follows Nuxt's runtimeConfig convention. Keys declared under runtimeConfig.public are sent to the browser; top-level keys are server-only. Override either at runtime with prefixed environment variables (NUXT_PUBLIC_* for public, NUXT_* for private).
export default defineNuxtConfig({
runtimeConfig: {
public: {
appName: 'My Admin',
},
// private (server-only) keys go here, e.g.
// authSecret: '',
},
})
Override either at runtime with prefixed environment variables:
# Public (sent to the browser) — overrides runtimeConfig.public.appName
NUXT_PUBLIC_APP_NAME="My Admin"
# Private (server only)
# NUXT_AUTH_SECRET="change-me"
# NUXT_DATABASE_URL="postgres://user:pass@localhost:5432/app"