v3.0.0-rc.1
Pre-releasev3.0.0-rc.1
Bridge is a forward-compatibility layer that allows you to experience many of the new Nuxt 3 features by simply installing and enabling a Nuxt module.
Using Nuxt Bridge, you can make sure your project is (almost) ready for Nuxt 3 and have the best developer experience without needing a major rewrite or risk breaking changes.
⚠️ Note: Nuxt Bridge provides identical features to Nuxt 3 (Nuxt 3 docs) but there are some limitations.
🏛️ Background
Since we first introduced Nuxt Bridge, it's been a long process, with considerable instability as we've backported features from Nuxt 3 and released each commit via the edge channel.
At this point, we're excited to announce the release of Nuxt Bridge v3.0.0-rc.1, which marks a significant milestone in the development of Nuxt 3. With this release, we've ironed out many of the remaining issues and have made significant progress in bringing Nuxt 3 features to Nuxt Bridge. Some of the notable improvements in this release include better TypeScript support, improved performance (particularly with Nitro and Vite integrations), and enhanced stability.
🚧 Roadmap
Moving to RC status is the first step in adopting a more stable release schedule, meaning regular releases with a stable upgrade path.
We plan to continue working on Nuxt Bridge to ensure basic feature parity with Nuxt 3 as part of our plan to help users migrate from Nuxt 2 to Nuxt 3, as well as working on documentation and tooling to help users migrate from Bridge to Nuxt 3.
🚨 Nuxt 2 EOL
Finally, in view of the delay in Bridge release, we will be extending the Nuxt 2 EOL date to June 30, 2024.
❤️ Thank you
This first release candidate is thanks to the hard work of many users, both in raising issues and putting the time in to triage and submit pull requests.
👉 Changelog
🚀 Enhancements
- Nuxt bridge (#459)
- bridge: Enable composition-api (#551)
- bridge: Add useNuxtApp and defineNuxtPlugin composables (#576)
- bridge: Add support for legacy composition api helpers (#584)
- bridge: Better resolution within wp4 (with fallback) (#608)
- bridge, nuxt3: Expose equivalent useRoute and useRouter com… (#615)
- Use native esm for all packages (#539)
- bridge: Enable automatic global imports for nuxt2 (#609)
- kit, bridge: Version constraint utils and checks (#442)
- nuxt3, bridge: UseRuntimeConfig (#625)
- Export defineNuxtConfig from nuxt3 and @nuxt/bridge (#669)
- bridge: Use useMeta in bridge projects (#664)
- bridge: Add support for <script setup> (#678)
- nitro: Automatically type middleware/api routes (#708)
- useState composable (#719)
- nuxt3: useFetch (#721)
- bridge: Init function for useState (#773)
- auto-imports: Allow extending with config and hooks (#1167)
⚠️ Add engines.node field and node.js version check (#1197)- nitro: Update dependencies for node-fetch 3.x support (#1373)
- Define nitro #storage and #assets types (#1377)
- bridge: Allow accessing injections from useNuxtApp (#1623)
- bridge: Add useNuxt2Meta() composable (#1789)
- bridge, nuxt3: Mock vue-demi (#1849)
- nuxt3, bridge: Add lazy helpers (useLazyAsyncData and useLazyFetch) (#1861)
- nuxt3, bridge: useCookie universal composable (#2085)
- bridge: Generate components declarations (#2174)
- bridge: Allow user-defined scriptSetup options (#2185)
- deps: Update all non-major dependencies (#2252)
- nuxt: Add wrapped useRoute and useRouter composables (#2406)
- nuxt3, bridge: useReqHeaders composable (#2173)
- kit, schema:
⚠️ Finalize nuxt 3 module spec and utils (#2275) - nuxt3, bridge: Add vue:setup hook (#2408)
- bridge: Upgrade unplugin-vue2-script-setup (#2687)
- Improve base url options (#2655)
- kit:
⚠️ Expose resolvePath (#3110) - nuxt3,bridge: Add automatic schema augmentation declaration (#3096)
- bridge: Add support for useNuxt2Meta in plugins (#3187)
- bridge: Support addRouteMiddleware, navigateTo and abortNavigation (#3193)
- Shared logger and silent test logs (#3259)
- nuxt3: Expose /app export paths (#3323)
- nuxt3: Add universal routing utilities (#3274)
- bridge: Auto-inject based on provide key from plugins (#3536)
- nuxt3: Auto generate runtime config type declarations (#3573)
- nitro, nuxt3: Allow handling otherwise unhandled runtime errors (#3464)
- router: Add proper server side redirection to navigateTo (#3684)
- nuxt3: useFetch with dynamic reactive request (#3731)
- refreshNuxtData function and app:data:refresh hook (#3929)
- vite: Upgrade to vite 2.9.0 (#3974)
⚠️ Migrate to nitropack (#3956)⚠️ Use vue 2.7 to provide composition api (#378)⚠️ Upgrade to vue-bundle-renderer 0.4 (#476)⚠️ Use native vue-router composables (#533)- Use new nitropack render response (#548)
⚠️ Migrate to vite 3 (#480)⚠️ Upgrade to new major nitropack/h3 (#589)- Add ssr routeRule (#593)
- Add error composables from nuxt 3 (#588)
⚠️ Upgrade to stable nuxt and server dependencies (#648)- Backport navigateTo updates from v3 (#666)
- Upgrade core nuxt dependencies to v3.3.2 (#719)
- deps: Update dependency vite to v4 (#724)
- Update error handler to latest upstream version (#761)
- Allow setting a global errorHandler (#783)
- Port upstream vite-node dev server implementation (#779)
- Replace @vueuse/head with @unhead/vue (#804)
- Generate middleware types (#796)
- Add addRouteMiddleware test (#827)
- Generate tsconfig.json when not using nuxt/cli (#889)
🔥 Performance
- bridge: Allow skipping legacy composition api support (#2388)
- ssr: Disable vite's pre-trasnfroming to improve perf (#2574)
🩹 Fixes
- bridge: Set webpack as implicit external (62a11d0)
- bridge: Generate dist/runtime (901896d)
- bridge: Handle ssr: false (#489)
- bridge: Add implicit dependencies (f38267b)
- bridge: Downgrade estree-walker dependency (#600)
- bridge: Add additional vue composition-api resolutions (#614)
- bridge: Import nuxt3 src from relative path (806169d)
- Add main entrypoints for packages (#629)
- bridge: Resolve browser condition above main for client (#641)
- bridge: Emit types for module (#660)
- bridge: Don't error with defineNuxtMiddleware (#676)
- bridge: Detect conflict with @nuxt/typescript-build usage (#672)
- bridge: Automatically transpile all modules (and sanitize transpiles) (#677)
- bridge: Add meta to cjs wrapper (#671)
- bridge: Don't rely on auto-imports in internal plugin (#700)
- bridge: Use esm for unplugin-vue2-script-setup (#690)
- bridge: Define head with vue-meta type (#784)
- bridge: Remove circular reference (#844)
- bridge: Alias direct references to vue files (#847)
- bridge: Add vuex alias (#1026)
- bridge: Add useState to auto-imports (#1087)
- bridge: Do not resolve esm babel helpers (#1158)
- bridge: Typo fix (#1168)
- pkg: Downgrade node version to 14.17.x due to codesandbox issue (3640b3e)
- pkg: Downgrade node version to 14.16.x due to stackblitz issue (7f0fd26)
- bridge: Improve warnings for @nuxtjs/composition-api migration (#1237)
- bridge: Add missing globby and scule dependencies (f53f1a5)
- bridge: Mark defineNuxtMiddleware as unsupprted (4cdb1dc)
- pkg: Support node 17.x in the engines field (#1443)
- bridge: Can't enable vite mode (#1505)
- bridge: Fix fouc on vite (#1515)
- vite: Don't replace process.env (#1543)
- vite: Improve external checks for dev-bundler (#1538)
- bridge: Detect existence of @nuxt/bridge-edge (#1575)
- bridge: Expose nuxi command (#1599)
- vite: Remove conflicting vite aliases (#1624)
- vite, bridge: Avoid vite resolving tsconfig.json (#1677)
- bridge: Enable vite build by default (#1709)
- vite: Swap style on dev ssr (#1712)
- nuxt3: Add missing auto imports (#1735)
- bridge: Default export detection (#1774)
- nitro, nuxi: Add runtimeConfig types (for #config and useRuntimeConfig()) (#1783)
- vite: Remove global replacement (#1835)
- bridge: Plugin default detection (#1847)
- bridge: Update useContext (#1871)
- bridge: Disable legacy fetch polyfills (#1866)
- bridge: Ensure vue ts alias points to original vue (#1924)
- bridge: Revert optimization exclusion for vue-demi (#1932)
- nuxi: Ignore static check with prepare command (#1971)
- bridge: Add docs links and warnings for data composables (#2010)
- vite: Separate dynamic deps in dev-bundler (#2067)
- bridge: Remove duplicated log (#2087)
- Use cookie-es (e204b8b)
- bridge: Fixed reactivity on csr of useState reactive payload (#2134)
- schema: Extend NuxtOptions for nitro & bridge types (#2131)
- nuxt3: Include error and pending values in asyncData state (#2130)
- bridge: Remove falsy values from created and mounted (#2182)
- vite: Include dynamic css (#2067, #2227)
- bridge: Always add components.d.ts reference (#2246)
- bridge: Normalize strings in vite middleware template (#2319)
- vite: Respect users config (#2395)
- bridge: Respect custom app.html (#2339)
- bridge: Install bridge module at the end (#2611)
- Upgrade vite to 2.7.12 (#2716)
- bridge: Add missing process flags for vite (#2736)
- vite: Invalidate virtual modules when templates are regenerated (#2725)
- bridge: Set app.basePath (#2808)
- bridge: Don't override existing baseURL property (#2827)
- bridge: Build fails with SSR turned off (#2708)
- nuxi,nuxt3,bridge: Generate all templates with nuxi prepare (#2409)
- bridge: Add nitro:generate hook (#3044)
- bridge: Type useNuxtApp() (#3057)
- bridge: Don't instantiate vite builder if only preparing types (#3050)
- Sanitize import filenames in generated imports (#2216)
- bridge: Support newer js targets with webpack (#3131)
- bridge: Respect --fail-on-error in generation (#3134)
- nuxt3: Prevent removing and re-adding tags before mount (#3212)
- bridge: Add schema.d.ts to nuxt.d.ts (#3237)
- bridge: Add modules with hooks after all other modules (#3239)
- bridge: Execute metaInfo function (#3258)
- nuxt3,bridge: Correctly reference router from client-side helper (#3281)
- config: Add analyze plugin options in bridge mode (#3292)
- bridge: Use typescript directory entry (#3365)
- nuxt3: Share scanned components with loader (#3396)
- bridge: Port nested _nuxt dir fix to bridge vite (#3538)
- bridge: Use vue server build (#3515)
- bridge: Handle static nested vite dirs (#3565)
- Ensure debounced/async handlers run in order (#3656)
- Update ufo (4724d97)
- Use perfect-debounce to handle trailing run of promise (#3679)
- pkg: Add implicit dependencies (#3682)
- auto-imports: Windows issue with parsing query from path (#3700)
- bridge: Add implemented runtime nuxt hooks (#3872)
- bridge: Replace nuxt 3 auto-imports (#3850)
- bridge: Don't double-install plugins when using compat vueApp.use (#3898)
- deps: Pin vite to 2.8.x (607e9b9)
- bridge: Remove defineNuxtLink from auto-imports (#4022)
- bridge: Transpile @nuxt/bridge-edge (#4070)
- deps: Upgrade unimport (#4095)
- nuxt3: Move new router behavior to useActiveRoute (#4124)
- bridge: Resolve vue from .nuxt, not node_modules (#4146)
- bridge: Exclude unsupported imports via autoImports:sources (#4127)
- Regressions from nitropack migration (#4157)
- bridge: Inline bridge dist files (#4170)
- bridge: Add missing dependency (#4172)
- Nitropack fixes and upgrade to 0.2.x (#4187)
- bridge: Add ui-templates dependency (#4195)
- nuxt3,bridge: Rename error handler url (#4215)
- vite: Prefer hmr ws protocol (#4203)
- bridge: Move @vueuse/head to dev dependencies (#4218)
- nitro: Add NUXT_NO_SSR when ssr is disabled (#203)
- Add backward compatibility for new runtimeConfig (#303)
- Revert to static dir (#316)
- Mark config head as non-reactive (#336)
- Update issue link when using vite (#333)
- Alias defu module change to ECMAScript module (#335)
- Correct auto-imports (#359)
- Allow installing on node v18 (#374)
- Write document template to buildDir (#376)
⚠️ Remove unplugin-vue2-script-setup in favour of native vue 2.7 (#384)- Update implementation for legacy useFetch for vue 2.7 (#387)
⚠️ Upgrade nitropack (#324)- module: Resolve bridge top level option (#390)
- Type nuxt.options as any to allow setting .bridge property (6ebdec4)
- Initialise nitro options (bd136fd)
- Disable prerendering by default on build (eaf8f18)
- Insert stub virtual file for server when ssr: false (2f967e9)
- Pass nuxt baseURL to nitro (ee600b4)
- Set nuxt context and normalise config as first module (#397)
- Throw error if wrapper isn't used (#405)
- Initialise bridge config to object (#412)
- Asset path should not be relative to page (#402)
- types: Allow head configuration as function (#420)
- Remove imports that are not exported from vue (#431)
- Increase browser support (#434)
- types: Deduplicate types (#469)
- module: Use ctx.tryUse() (b0bfa61)
- Handle functional generate.routes (#475)
- Add @nuxt/devalue dependency (b9d8025)
- Normalize dev webpack manifest (#505)
- nitro: Default to nitro generator and use resolved nitro routes (#507)
- deps: Update all non-major dependencies and pin nuxi (#514)
- Use named version from 'vue' (#470)
- Improve types and use relative imports for composables (#532)
- Without nitro, don't modify webpack manifest, and throw error for vite (c20d90e)
- Use .nuxt rather than .payload on ssrContext (4585eb0)
- Expose nitro instance via kit useNitro (378ce3d)
- Await resolveSchema (now async) (6f7627d)
- Apply runtimeConfig proxy directly to ctx.config (#552)
- vite: Use named exports from stub (08517ab)
- vite: Only include legacy chunks in entrypoint (9ee6956)
- Deprecate import hooks before user modules (058a6c1)
- Normalize config before module-injected plugins (#574)
- Provide nuxt useRoute and useRouter composables (#590)
- Hook up watchers to nuxt 3 hooks (#587)
- Check watchers exist before registering hooks (a725a7a)
- Regression in entrypoint with CDN URL (#611)
- vite: Enable vite strict mode (4aaf4eb)
- Correct redirectLocation path resolution (#682)
- Update links to nuxt.com (a4c5d19)
- Remove postcss8 option (#702)
- Minor dependency upgrades (#718)
- Do not access .value from useRoute (6cc36f5)
- Type nuxt 2 context with @nuxt/types (#749)
- deps: Update all non-major dependencies and transpile ohash (#744)
- Initialise nitro options (c90f6a2)
- Correct test for isFullStatic in legacy composition api (#731)
- Write components.d.ts to correct path (#758)
- Remove ../ from css paths (#759)
- Allow newer node versions (9020673)
- Change from buildDir to typesDir (#763)
- Add server:devHandler hook for webpack (#772)
- Generate vite dev manifest when ssr: false (#775)
- Use correct extractCSS type (#785)
- Move nuxt 2 context types to bridge-schema (#752)
- Generate templates based on middleware dir (#797)
- Avoid recursive import from nitro runtime app (#801)
- Do not warn about legacy capi in production (#806)
- Convert defineNuxtRouteMiddleware to legacy middleware (#814)
- Add vite/runtime in distDir (#842)
- Support process.browser (#848)
- Set router.base to app.baseURL (#830)
- Do not delete root (#851)
- Prefer disabling imports with imports.autoImport (#853)
- Render bodyPrepend in template (#837)
- Use Nuxt2Context instead of NuxtAppCompat. (#862)
- Render head server-side (#838)
- Do not inject imports within node_modules (#873)
- Transpile unhead even when meta: false is set (#877)
- Add unenv to transpiles (d820607)
- Allow returning Route from defineNuxtRouteMiddleware (#878)
- Remove VueHeadMixin (#887)
- Remove nuxi dependency and prompt to install when needed (#907)
- Mock new hookable methods (#921)
💅 Refactors
- Migrate from upath to pathe (#553)
- bridge: Use babel typescript plugin instead of nuxt-swc (#653)
- nuxi: Extract nitro types to corresponding modules (#668)
- nuxt3: Cleanup data fetching and improved useAsyncData (#699)
- Rename global-imports to auto-imports (#706)
- bridge: Implement ssrRef with useState (#787)
- Rename app to vueApp (#1177)
- vite: Reuse common modules (#1723)
- Remove unnecessary optional chaining (#1991)
- Split schema to @nuxt/schema and simplify kit (#2059)
- nitro: Expose writeTypes and call this within builder:generateApp (#2413)
- Write declarations to /types (#3067)
⚠️ Migrate to unimport (#3386)- Use ufo.hasProtocol to detect external link (#3686)
- Add some more explicit types (#3721)
- bridge: Provide vue2 compat with a transform plugin (#3886)
- bridge: Align bridge with vite and inline systemjs polyfill in entry (#4005)
- nuxt3,bridge:
⚠️ Rename useMeta to useHead (#4066) ⚠️ Rename autoImports to imports (#528)- Write prettified build manifest (#762)
📖 Documentation
- Add migration guide for bridge composition api (#1669)
- bridge: Fix bridge composition api link (#4147)
- Small fixes (da8db8c)
- Add development instruction to readme (#332)
- Fix link to module.ts in README (#704)
- Update package manager in readme (#713)
- Update example options in readme to mention using old cli (#835)
- Add import instructions when auto-imports are disabled (#840)
- Remove bridge migration steps from README (#905)
🏡 Chore
- Update all non-major dependencies and add node to nitro external conditions (#440)
- Update to unbuild 0.5.x (#545)
- Ping unbuild to latest for sub packages (599ca53)
- bridge: Add missing defu dependency (0d5797d)
- Update base major versions to 3.x for simplicity (6d12e24)
- Add readme to packages (#727)
- Change Nuxt3 to Nuxt 3 (#764)
- Move nuxt-vite to bridge (#1180)
- docs: Add code format using markdownlint (#1498, #1556)
- lint: Enable eslint on mjs (#1804)
- lint: Improve no-unused-vars rule (#1977)
- bridge: Improve typing of defineNuxtPlugin function (#1995)
- Remove unused @types/cookie (7a705cd)
- Migrate to vitest from mocha (#2694)
- bridge: Upgrade vite (#3238)
- Upgrade unplugin-vue2-script-setup (#3640)
- Create lockfile (d43e81e)
- Finish bridge migration to separate repository (#4)
- Start edge releases (bbbbeb4)
- Init readme (792f8f3)
- Remove outdated lint rules (#360)
- Upgrade some safe dependencies and refresh lockfile (#361)
- Upgrade to RC kit, schema & templates (#362)
- Exclude nitropack from updates (5975209)
- Upgrade non-vue dependencies (#377)
- Add MIT license (#383)
- Reenable nitropack version bumps (b168554)
- Enable vue & vue-router upgrades (fb7f345)
- Try different syntax (af0b52f)
- Upgrade unplugin (#462)
- Update lockfile (4d224f0)
- Defer vite/bundle-renderer upgrades to separate PRs (5e7c7ab)
- Ignore vitest updates (38e2acb)
- Ignore nuxi upgrade pending rc10 (6cb94aa)
- Allow nuxi upgrades (518c0f3)
- Add stackblitz sandbox to issue template (3bcd0e0)
- Ignore vitest upgrade (f85d3c7)
- Temporarily avoid upgrading @vueuse/head (5ca52e5)
- Migrate to pnpm (#598)
⚠️ Bump dependencies (#645)- Remove vue3 vite plugin (c80e571)
- Update renovate config to exclude nuxt3 (5893180)
- Update to recommend 2.16.0 rather than edge channel (#699)
- Update devdependency @vueuse/head to v1 (#711)
- Handle nuxt framework upgrades together (af952c8)
- Totally ignore vue renovate updates (c7ed104)
- Add issue reproduction bot (#883)
✅ Tests
- nuxt3: Add unit tests for generateRoutesFromFiles (#261, #1227)
- Update test util to detect browser warnings (#477)
- Add object prop validation as well (2f69fe0)
- Skip checking for css in vite build (fcf636d)
🤖 CI
- Enable provenance for edge releases (0f91db9)
⚠️ Breaking Changes
⚠️ Add engines.node field and node.js version check (#1197)- kit, schema:
⚠️ Finalize nuxt 3 module spec and utils (#2275) - kit:
⚠️ Expose resolvePath (#3110) ⚠️ Migrate to nitropack (#3956)⚠️ Use vue 2.7 to provide composition api (#378)⚠️ Upgrade to vue-bundle-renderer 0.4 (#476)⚠️ Use native vue-router composables (#533)⚠️ Migrate to vite 3 (#480)⚠️ Upgrade to new major nitropack/h3 (#589)⚠️ Upgrade to stable nuxt and server dependencies (#648)⚠️ Remove unplugin-vue2-script-setup in favour of native vue 2.7 (#384)⚠️ Upgrade nitropack (#324)⚠️ Migrate to unimport (#3386)- nuxt3,bridge:
⚠️ Rename useMeta to useHead (#4066) ⚠️ Rename autoImports to imports (#528)⚠️ Bump dependencies (#645)
❤️ Contributors
- Daniel Roe [email protected]
- Ryota Watanabe
- Marco Solazzi [email protected]
- Matt Garrett [email protected]
- Wattanx [email protected]
- Max Berkelmans (@LemmoTresto)
- Yue Yang (@g1eny0ung)
- Jean-Pierre Carvalho
- Felix
- Alexander Lichter (@manniL)
- Andrey Yolkin [email protected]
- Ilya Semenov (@IlyaSemenov)
- Jonas Thelemann (@dargmuesli)
- Pooya Parsa (@pi0)
- Anthony Fu [email protected]
- Yoho [email protected]
- AndreyYolkin [email protected]
- Victor (@Luferov)
- Eckhardt (Kaizen) Dreyer [email protected]
- Dizzy Rogers
- François Risoud (@qnp)
- Divine
- Xin Du (Clark) [email protected]
- Blazmrak [email protected]
- Yasser Lahbibi (@yassilah)
- Mohammad Saleh Fadaei
- Matteo Rigoni (@Rigo-m)
- Damian
- Tobias Diez [email protected]
- Levi (Nguyễn Lương Huy) (@huynl-96)
- Matt Kane [email protected]
- Sébastien Chopin [email protected]
- Ahad Birang [email protected]