v0.23.0
0.23.0 (2021-04-12)
⚠ BREAKING CHANGES
-
@nuxtjs/composition-api/moduleis now how the module should be imported innuxt.config -
There is no longer a need to amend
moduleNameMapperin your jest.config - you should remove any entry for@nuxtjs/composition-apithere. 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/babelhas been renamed to@nuxtjs/composition-api/dist/babel-plugin. -
@vue/composition-apiis 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,defineNuxtModuleanddefineNuxtServerMiddlewarehave 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
fromrather thanredirectedFromfromuseContext(a159d87), closes #444
Code Refactoring
- change how library is imported (#418) (5bb1a72)
- fixed an issue with
nuxt-vitecompatbility
- 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.mjsfiles in webpack 4). - This library is now located within
node_modulesrather than being templated, with a limited template for the config.
- The ESM version of the library is now