nitropack
2.13.6 · 2 Nov 2026MIT3.9M / weekRepositoryHomepagenpmAtom feed
134 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 2.x · latest line
2.6.2
27 Aug 2023Use new h3 generics for
defineCachedEventHandleraws-lambda, netlify: Add
isBase64Encodedresponse fieldExclude typed body from
cachedEventHandler
Fixes
Use new h3 generics for
defineCachedEventHandleraws-lambda, netlify: Add
isBase64Encodedresponse fieldExclude typed body from
cachedEventHandlerstatic: Send immediate empty responses for 304 handling
2.6.1
25 Aug 2023Correctly mark
middleware: falsefor scanned routesPass relative ignore paths when scanning public assets
Fixes
Correctly mark
middleware: falsefor scanned routesPass relative ignore paths when scanning public assets
2.6.0
23 Aug 2023- Removed
Remove non-standard
moduleexport condition - Removed
pkg: Remove node 14 from supported
engines storage: Default data storage for
nodeand dev presets
note
📰 Release article coming soon!Enhancements
storage: Default data storage for
nodeand dev presetsSupport regexps in external options
Support
exportConditionsand add worker default conditionsevent.waitUntilwith Cloudflare integrationexperimental.typescriptBundlerResolutionflagSupport
ignoreto ignore scanned filesAllow ignoring public assets with
ignoreoptionsAdd
iisserver presetAuto capture errors with
nitroApp.captureErrorvercel: Enable streaming support out of the box
Fully resolve type paths for auto-import declarations
Add
prerender:config,prerender:initandprerender:donehookscache: Support cached event handlers with varies
app: Support
request,beforeResponseandafterResponsehooksExperimental composition api via
useEvent()ans async context supportprerenderer: Support for query links exploration
cloudflare-pages: Add config to customize generated
_routes.jsonfirebase: Add support for 2nd generation functions
externals: Resolve actual subpaths before guessing
externals: Support aliasing traced packages
wasm: Support output esm imports
Enable
timingin debug modeprerender: Preserve prerendered asset
content-typeheaderexternals: Improved output
package.jsonfirebase: Support renaming exported server function
azure: Support custom configuration
node-server: Support listening to unix sockets using
NITRO_UNIX_SOCKETcloudflare-module, cloudflare-pages: Experimental dynamic imports
cli: Support
--presetand--minify/--no-minifyargs forbuildcli: Add listhen options for
devcommandHandle stream and
Uint8Arrayfor lambda presets
Performance
Use
fsLitedriver for productiondata:storageUse inline
http-graceful-shoutdownto reduce externalsRemove
source-map-supportas node supports--enable-source-mapsBundle runtime dependencies
Use local fetch for proxy route rules
Fixes
rollup: Replace
globalThis.process.withprocess.types: Enable
allowSyntheticDefaultImportsoption by defaultcache: Try to call
event.waitUntildefineCachedFunction: Properly infer function type
static: Safe decode path
Split cookie headers
deno-deploy: Treat all
https://modules as externalcache: Call
event.waitUntilon main resolver when expiredprerender: Skip redirects
aws-lambda,netlify: Base64 encode binary responses
app: Enable router preemptive mode
vercel: Allow arbitrary function configuration
Use relative paths in
tsconfig.jsonprerender: Free up memory after each route is written to the disk
prerender: Call
prerender:routebefore freeing up memoryprerender: Only match
hrefattribute after whitespaceexternals: Absolute paths are inlined
openapi: Merge handlers with same route and different method
prerender: Exclude encoded
hrefattributes from link extractionexternals: Increase score for npm package name patterns to avoid breaking changes
deno-deploy: Decode static asset path before reading from filesystem
- Removed
Remove non-standard
moduleexport condition externals: Trace externals with their commonjs / esm status
Use relative paths in generated tsconfig
app: Use
event.pathinstead ofevent.urlcache: Don't use
_originalPathtypes: Use relative type path to nitro
#internal/nitroDisable sourcemap minify for dev
Use relative source map paths and add test
- Removed
pkg: Remove node 14 from supported
engines prerender: Use decoded asset id to access prerendered asset header overrides
Add
consola/corealiasvercel,netlify: Don't deprecate
swrwhencache: falsebuild: Workaround bun's difference in
function.toString()firebase: Ignore
fseventdependencyDirectly pass
localFetchto route rules handlerstormkit: Properly send buffer responses
Add parent
node_modulesof nitro to modules dir for pnpm compatdeno-server: Fix injections and enable back tests
2.5.2
28 Jun 2023Add
envPrefixtoruntimeConfig.nitrotypesprerender: Allow to fetch static files
options: Default target to
staticwhenstaticoverride is set
Fixes
Add
envPrefixtoruntimeConfig.nitrotypesprerender: Allow to fetch static files
options: Default target to
staticwhenstaticoverride is setCorrect default
node-servertargetvercel, netlify: Always check
nativeSWRfuture flagvercel, netlify: Handle boolean values for route rule deprecation
Dedup
unstoragedependency and use subpath aliasdev: Ensure socket path is accessible
Type
event.$fetchandevent.fetchAllow configuring
esbuildtransform plugin
2.5.1
22 Jun 2023Avoid overriding app runtime config namespace
2.5.0
21 Jun 2023Type generics supported for
useStorageanduseRuntimeConfigand lots of more type safety enhancements across ecosystemUnJS ecosystem packages upgraded to the latest versions with lots of bug fixes and enhancements
With
h3@1.7.0we are now experimenting response streaming support (Demo).
What is new?
Type generics supported for
useStorageanduseRuntimeConfigand lots of more type safety enhancements across ecosystemUnJS ecosystem packages upgraded to the latest versions with lots of bug fixes and enhancements
With
h3@1.7.0we are now experimenting response streaming support (Demo).
Enhancements
Allow customising generated
tsConfigType
useRuntimeConfigwithNitroRuntimeConfigType nitro app runtime hooks
Add
cloudflare-pages-staticpresetAdd experimental
deno-serverpresetSupport
jsxandtsxout of the boxAdd support for
failOnErrorGeneric type support for
useStorageProvide static
process.*andimport.meta.*build flags
Fixes
bun: Resolve internal dependencies with
bunexport conditiondeno: Support environment variables
Respect
staticflag when auto-detecting presetprerenderer: Don't inherit
staticconfigvercel: Add check for index route rule
Use
event.handledguard before sending direct responsesImport
NitroRuntimeHooksfrom runtime dirGenerate types for
#imports
2.4.1
16 May 2023Make sure to recreate the lock file as well in order to receive all UnJS ecosystem updates.
If you are using Nitro via Nuxt, simply use
npx nuxi@latest upgrade --force.pkg: Add
http-proxytypes to deps
How to Upgrade?
Make sure to recreate the lock file as well in order to receive all UnJS ecosystem updates.
If you are using Nitro via Nuxt, simply use
npx nuxi@latest upgrade --force.
Fixes
pkg: Add
http-proxytypes to depsvercel-edge: Use platform provided
processshimnetlify-edge: Update output format
netlify-edge: Support environment variables
netlify-edge: Handle static asset urls
netlify-edge: Fix body handling
vercel-edge: Fix body handling
deno, lagon, sw: Fix request body handling
netlify-edge: Polyfill missing
x-forwarded-protoheader
2.4.0
5 May 2023Add Cloudflare module worker support
vercel, netlify: Introduce
isrroute ruleAdd
staticpreset
How to Upgrade?
If you are directly using Nitro, make sure to recreate lockfile as well in order to receive all UnJS ecosystem updates.
If you are using Nitro via Nuxt, simply use
npx nuxi@latest upgrade --force.What is new?
isrroute ruleVercel and Netlify route rules support a dedicated
isrflag to enable Incremental Static Regeneration.For backward compatibility, we keep converting
swrandstaticroute rules toisrfor these two presets. If you were previously depending onswrandstaticroute rules, we highly recommend to upgrade nitro and switch toisrflag:routeRules: { -- '/blog/**': { swr: 3000 }, ++ '/blog/**': { isr: 3000 }, }If you like to leverage Nitro Native SWR cache (stored in storage), you can opt-in using
future.nativeSWR: true(nuxt:nitro.future.nativeSWR) config.Vercel KV Storage
In collaboration with the Vercel team, Nitro now supports seamless integration with Vercel KV Store. See docs for usage information.
Cloudflare Module Worker Preset
You can opt-in to the new Cloudflare Module Worker output format.
The cloudflare pages preset is also upgraded to the worker format with this release
First-class static targets
While Nitro is a server builder, it can be also used to prerender all routes using a renderer and output only static output. New
static,vercel-static,netlify-staticandgithub-pagespresets are now available to only output prerender and skip the production server build.Config HMR support
You can now directly edit route rules and runtime config within
nitro.configwithout the need to restart the nitro server! See #1175 for more information.Dynamic App Config and Runtime Config
Previously, both
useAppConfig()anduseRuntimeConfig()were returning a frozen object. Now usinguseAppConfig(event)anduseRuntimeConfig(event)you can have a fully dynamic interface, enabling dynamic, per-request config and support for environments such as Cloudflare where env is only available during the request lifecycle.If you were previously using
useAppConfig()anduseRuntimeConfig()in an ambient context (outside of event handlers and composable functions, we highly recommend to migrate to the new API:-- const appConfig = useAppConfig() export default eventHandler(event => { ++ const appConfig = useAppConfig(event) })See #1154 for more information.
Experimental Swagger and Open API support
Swagger and OpenAPI are de facto standard tools for documenting server API routes. You can now see all auto-generated API docs by enabling
experimental.openAPI: true(nuxt:nitro.experimental.openAPI: true) and opening/_nitro/swaggerUI.See #1162 for more information.
We are working to bring route-level meta definition for an even better and more detailed docs generator.
New Documentation and Branding
Nitro docs and logo are live with a new fancier design at nitro.unjs.io
Enhancements
Add Cloudflare module worker support
vercel, netlify: Introduce
isrroute ruleAdd
staticpresetAdd
vercel-staticandnetlify-staticpresetsAdd
github-pagespresetPass resolved config to
rollup:beforehookConfig reload support for
nitro devConfig hmr support for
routeRulesandrutimeConfigSupport dynamic app config and runtime config
Experimental
/_nitro/openapi.jsonand/_nitro/swaggerfor dev modevercel: Add support for specifying edge regions
future.nativeSWR
Performance
Export
defineNitroConfigfromnitro/config
Fixes
Separate
typesDirfromtsConfigDircloudflare: Expose env from module context
proxy: Append request query params for single proxy route rules
vercel, netlify: Keep default behavior for
staticandswrtoisrmappingApply
chunkFileNameson windowspkg: Allow installing on node v20 and above
2.3.3
11 Apr 2023Upgrade to consola v3 (release notes)
prerender: Show generated routes with error in logs
prerender: Respect output path from main preset
Enhancements
Upgrade to consola v3 (release notes)
Fixes
prerender: Show generated routes with error in logs
prerender: Respect output path from main preset
2.3.2
22 Mar 2023Sanitize
statusMessageof disallowed charstypes: Sync vercel build config types
azure: Support custom baseURL
Fixes
Sanitize
statusMessageof disallowed charstypes: Sync vercel build config types
azure: Support custom baseURL
vercel-edge: Fix route generation
Mark
options.rendereras optionaltypes: Make $Fetch types less complex
2.3.1
13 Mar 2023types: Don't simplify type of serialized return
2.3.0
13 Mar 2023vercel: Add functions config
Add support for
sourceMapvalueshiddenandinlinelagon: Write
.lagon/config.jsonon build
Enhancements
vercel: Add functions config
Add support for
sourceMapvalueshiddenandinlinelagon: Write
.lagon/config.jsonon buildtypes: Type $fetch to match json serialization output
Support base in
useStorage(base?: string)and improve docscloudflare-pages: Rewrite with module syntax
Allow customising generated tsconfig path
Support app config
Fixes
cloudflare-pages: Only allow 100 rules combined
Only mock
debugin productionScan middleware and print tree list in ascending alphabetical order
externals: Correctly specify multiple external dependencies in package.json
static: Use correct format for last modified
cache: Remove rejected cache promise from pending list.
Expose
useStoragewith typesprerender: Allow spaces in
hrefvalue regexcache: Use stale value by default when
swris enabledResolve types relative to custom tsconfig path
Remove duplicate import in generated code
types: Exclude non serializable options from route rules
2.2.3
21 Feb 2023Add lagon preset
node-cluster: Default number of workers
cloudflare-pages: Exclude assets from function call
Enhancements
Add lagon preset
Fixes
node-cluster: Default number of workers
cloudflare-pages: Exclude assets from function call
cloudflare-pages: Handle assets only for get requests
Render json errors for cors requests
Use json response for errors in
/api/routes
2.2.2
17 Feb 2023Correct
access-control-allow-methodscors header nameAllow overriding assets
maxAgeusing route rulesrollup: Use mlly as fallback resolver when externals disabled
Fixes
Correct
access-control-allow-methodscors header nameAllow overriding assets
maxAgeusing route rulesrollup: Use mlly as fallback resolver when externals disabled
Don't render json response if url contains
/api/
2.2.1
9 Feb 2023static: Remove
cache-controlheaders when asset is not foundAvoid circular imports
Fixes
static: Remove
cache-controlheaders when asset is not foundAvoid circular imports
2.2.0
8 Feb 2023Runtime proxy support using route rules (learn more)
Nested fetch calls with incoming headers and context in event context (learn more)
Binary and Raw storage operations support (learn more)
What is new?
Runtime proxy support using route rules (learn more)
Nested fetch calls with incoming headers and context in event context (learn more)
Binary and Raw storage operations support (learn more)
Exposed
event.context.cf(learn more)Built-in session support (learn more)
Enhancements
Support runtime proxy using route rules
cloudflare:
cacheControlsupport for public assets with withmaxAgecloudflare: Expose
event.context.cffirebase: Use nodejs 18 as default runtime
Support
event.fetchandevent.$fetchvercel: Auto-detect runtime version
Fixes
Apply cached rules to overlaping wildcard patterns
cloudflare: Use full mime db
2.0.0
24 Jan 2023- Breaking
⚠️ Upgrade rollup to 3.x
- Breaking
⚠️ Rewrite external copy with multi version hoisting support
Rewrite external tracker with multi-version and hoisting support
Highlights
Rewrite external tracker with multi-version and hoisting support
Enable auto imports from
utils/dir
Enhancements
- Breaking
⚠️ Upgrade rollup to 3.x
types: Correctly type $fetch based on the method
cli:
preparecommandcache: Allow setting custom
getKeyfordefineCachedEventHandlerdev: Support for
/_vfs.jsonnetlify: Use esm entrypoint
- Breaking
⚠️ Rewrite external copy with multi version hoisting support
Add
shouldInvalidateCacheoption to cache utilsedgiopreset (replacinglayer0)Support
maxAgefor public assetsSupport
staleMaxAge: -1to always respond stale valueexternals: Apply
productioncondition to package.exportsEnable auto imports from
utilsdir
Fixes
GitHub template
deno: Implement readAsset
Normalize nitro plugin paths to URL in development
Use file urls for auto-imports in development
Initialise imports.imports
Allow optional
outputproperty in user rollup configAccept both upper/lower-case methods
prerender: Check each segment length is less than 255 chars and the whole path 1024
Include only compressible mime types
Remove base url before calculating route rules
netlify, vercel: Order route rules from most specific + avoid double-rendering root
build: Correctly formatted fs tree
prerender: Decode urls to allow comma in the
x-nitro-prerenderheaderbuild: Do not override publicAssets
dev: Improve vfs ui
Resolve and include scanDirs within
node_modulesfor auto importnetlify, vercel: Explicit server rendering with disabled cache/swr
prerender: Check link's pathname only for extensions
rumtime: Disable server-timing header via options.timing
Avoid using file URLs for normalized paths in options
Rollup treeshake is dump
externals: Normalize
inlineandexternalwindows pathsnetlify, aws: Omit cookies from v1 response
Filter unique scanned handlers
Resolve server asset dirs relative to
srcDirpublic-assets: Mock readAsset promise properly
externals: Avoid recursive package links
prerender: Update preview command to serve matching routes
externals: Support orphan files in
node_modulesAvoid hiding original rollup error message
cache: Only update cache in storage once per pending request
Add node16 compatible type declaration
externals: Improve multi version handling
- 1.x
1.0.0
16 Nov 2022- 0.6.x
0.6.1
3 Nov 20220.6.0
18 Oct 2022- Breaking
H3 updated to to 0.8x [Release Notes]
- Breaking
Experimental
routesis renamed torouteRules - Breaking
⚠️ Rename routeOptions to routeRules
Breaking Changes
- Breaking
H3 updated to to 0.8x [Release Notes]
- Breaking
Experimental
routesis renamed torouteRules
Enhancements
Support
redirect,headers, andcorsroute rulesnetlify: Incremental static regeneration + swr
Add
debuggeroption to debug hooksAllow matching multiple route rules
Normalize route options and shortcuts
cleavr: Add cleavr preset
cleavr: Auto detect preset
Allow disabling public dir generation using
noPublicDircache: Mock
res.end,res.writeandres.writeHeadcache: Support
headersOnlycache modeAllow
cache: falseroute rule to override cache options
Fixes
Fully resolve internal paths for autoimports
Retry writing traced files if there are conflicts
externals: Rewrite traced file paths to latest semver-minor version
Workaround rollup issue
Handle output dirs set to empty string
azure: Raw body no longer returns parsed json
Default
workspaceDirtorootDirrenderer: Directly return body to allow caching
cache: Only spy on end/write for string chunks
error: Do not assign default statusMessage for errors
cache: Use lowercase headers
cache: Abort cache handler for error status codes
cache: Skip error status codes by invalidating cache
deps: Ensure radix3 version is expected
cache: Invalidate entries with undefined body
app: Only apply cache rules ro routes (not middleware)
Refactors
- Breaking
⚠️ Rename routeOptions to routeRules
- 0.5.x
0.5.0
1 Sep 2022- Breaking
⚠️ Update unenv to 0.6.x
- Breaking
⚠️
NITRO_PRESETshould have the highest priority - Breaking
⚠️ Rename options
autoImporttoimports
Enhancements
Add
cloudflare-pagespreset [experimental]Support prerendering binary files
Opt-in option to compress public assets using
gzipandbrAllow specifying wasm plugin options
Allow using
extendsalongside withpreset
Fixes
azure: Fix route name
Add resolved side-effect for node-fetch-native
aws-lambda: Join cookies with semicolon
aws-lambda: Fix normalizeIncomingHeaders
aws-lambda: Return outgoing cookies on response objects
aws-lambda: Add
multiValueQueryStringParametersto aws preset- Breaking
⚠️ Update unenv to 0.6.x
Add code location and code frame for rollup errors
prerender: Allow updating route contents
externals: ⚠️ Fall back to
mllyresolver in more cases- Breaking
⚠️
NITRO_PRESETshould have the highest priority
Refactors
- Breaking
⚠️ Rename options
autoImporttoimports
Build
Breaking Changes
- Breaking
⚠️ Update unenv to 0.6.x
- Breaking
externals: ⚠️ Fall back to
mllyresolver in more cases - Breaking
⚠️
NITRO_PRESETshould have highest periority - Breaking
⚠️ Rename options
autoImporttoimports
- 0.4.x
0.4.3 – 0.4.2422 releases without a noteShow each
- 0.4.2412 Aug 2022no note
- 0.4.2312 Aug 2022no note
- 0.4.2211 Aug 2022no note
- 0.4.2111 Aug 2022no note
- 0.4.2011 Aug 2022no note
- 0.4.1911 Aug 2022no note
- 0.4.189 Aug 2022no note
- 0.4.179 Aug 2022no note
- 0.4.169 Aug 2022no note
- 0.4.159 Aug 2022no note
- 0.4.148 Aug 2022no note
- 0.4.138 Aug 2022no note
- 0.4.1213 Jul 2022no note
- 0.4.1113 Jul 2022no note
- 0.4.1013 Jul 2022no note
- 0.4.929 Jun 2022no note
- 0.4.815 Jun 2022no note
- 0.4.714 Jun 2022no note
- 0.4.613 Jun 2022no note
- 0.4.512 Jun 2022no note
- 0.4.411 May 2022no note
- 0.4.310 May 2022no note
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.