Releases: nuxt-community/composition-api
v0.24.3
v0.24.2
v0.24.1
v0.24.0
0.24.0 (2021-05-21)
⚠ BREAKING CHANGES
-
package exports have been moved
-
see #480 for context
-
output
.mjs
files for runtime templates -
(outside of Nuxt) only auto-registers plugin if NODE_ENV == 'test'
Bug Fixes
- add meta plugin after other modules (#481) (86ed34e)
- rework composition API registration (#484) (1e423c3), closes #476 #479
Build System
v0.23.4
v0.23.3
v0.23.2
v0.23.1
v0.23.0
0.23.0 (2021-04-12)
⚠ BREAKING CHANGES
-
@nuxtjs/composition-api/module
is now how the module should be imported innuxt.config
-
There is no longer a need to amend
moduleNameMapper
in your jest.config - you should remove any entry for@nuxtjs/composition-api
there. When used outside a Nuxt context, the module will 'auto-mock' and use https://github.com/nuxt-community/composition-api/blob/be94d4f4e1321565864dd3d3d5e850f7cabf6ca9/src/globals.ts instead of live Nuxt configuration. -
@nuxtjs/composition-api/babel
has been renamed to@nuxtjs/composition-api/dist/babel-plugin
. -
@vue/composition-api
is no longer transpiled by default. You should consider adding it tobuild.transpile
, but note that you may also need to add any other libraries that also use@vue/composition-api
. -
You should ensure you haven't named any layout '0' as this will conflict with how this package is registering the Vue Composition API.
-
defineNuxtConfig
,defineNuxtModule
anddefineNuxtServerMiddleware
have been removed. You can create your own helper with the following code:import { Module, ServerMiddleware, NuxtConfig } from '@nuxt/types' export const defineNuxtModule = <T extends Record<string, unknown>>(module: Module<T>) => module export const defineNuxtServerMiddleware = (serverMiddleware: ServerMiddleware) => serverMiddleware export const defineNuxtConfig = (config: NuxtConfig) => config
Bug Fixes
- register the composition api in a template file (#433) (8cc21ce), closes #415 #391
- return
from
rather thanredirectedFrom
fromuseContext
(a159d87), closes #444
Code Refactoring
- change how library is imported (#418) (5bb1a72)
- fixed an issue with
nuxt-vite
compatbility
- fixed an issue with
- significant packaging changes (#438) (ddc9c0f)
- The ESM version of the library is now
.mjs
(but we polyfill support for this and other.mjs
files in webpack 4). - This library is now located within
node_modules
rather than being templated, with a limited template for the config.
- The ESM version of the library is now