device
device copied to clipboard
Nuxt module for detecting device type.
How to use `$device` in nuxt __VLS_ctx.$device" is of type "Unknown  [docs](https://nuxt.com/modules/device#usage) nuxt 3.7.4 @nuxtjs/device 3.1.0 chrome 118.0.5993.89 nuxt.config.ts ``` { modules: ['@nuxtjs/device'], device: { refreshOnResize: true } }...
This is a 'canary' pull request. It aims to ensure that the ecosystem is ready for a shift in the default Nuxt TypeScript module resolution from 'Legacy' to 'Bundler': https://github.com/nuxt/nuxt/pull/24837....
Small thing IMO but the module is not listed as compatible with Nuxt3 as of right now https://nuxt.com/modules?q=device&version=3.x
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`^0.34.0` -> `^1.0.0`](https://renovatebot.com/diffs/npm/vitest/0.34.0/1.0.1) |...
We added a `prepare` command for nuxt-module-build which allows creating type stubs directly from the module without needing to apply to the playground as well. (https://github.com/nuxt/module-builder/pull/124) It's the default for...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [typescript](https://www.typescriptlang.org/) ([source](https://togithub.com/Microsoft/TypeScript)) | [`^4.8.3` -> `^5.0.0`](https://renovatebot.com/diffs/npm/typescript/4.9.5/5.3.2) |...
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-node](https://togithub.com/actions/setup-node) | action | major | `v3` -> `v4` | ---...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`0.34.0` -> `0.34.6`](https://renovatebot.com/diffs/npm/vitest/0.34.0/0.34.6) |...
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | digest | `3df4ab1` -> `b4ffde6` | ---...
I need help using this line [mentioned in the documentation](https://github.com/nuxt-modules/device#change-a-layout-dynamically) on how to change a layout dynamically: ```js export default { layout: (ctx) => ctx.$device.isMobile ? 'mobile' : 'default' }...