cookie-universal icon indicating copy to clipboard operation
cookie-universal copied to clipboard

warnings with nuxt3

Open buddudevelopers opened this issue 2 years ago • 2 comments

tried installing into a nuxt3 project got this warning

[warn] [nuxt] You are using a plugin with legacy Nuxt 2 format (context, inject) which is likely to be broken. In the future they will be ignored: ({ req, res }, inject) => {
  const options = {
  "alias": "cookies",
  "parseJSON": true
}
  inject(options.alias, __vite_ssr_import_1__.default(req, res, options.parseJSON))
}

buddudevelopers avatar Jul 28 '22 15:07 buddudevelopers

Yes this project is only compatible with the previous version of nuxt. I am not currently planning to migrate it but you could in theory use the cookie-universal base library and create a custom plugin, is only a few lines of code.

microcipcip avatar Aug 03 '22 21:08 microcipcip

There's a composable now with Nuxt 3 useCookies that comes by default

Aybee5 avatar Dec 04 '22 15:12 Aybee5