| React | Svelte | |
|---|---|---|
| Since | 2011 (before ES6) | 2016 (after ES6) |
| Type | Library (slower) | Compiler (faster) |
| Reactivity | Hooks, runtime | Plain variables, compile-time |
| Virtual DOM (2 DOMs) | Yes | No |
| Performance | Mostly ok, DOM diffing, easy to screw up | Very fast by default |
| Memory usage | High | Low |
*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build