8000 `nuxt.options.watch` not restarting dev server · Issue #22272 · nuxt/nuxt · GitHub
[go: up one dir, main page]

Skip to content
nuxt.options.watch not restarting dev server #22272
@userquin

Description

@userquin

Environment

npx nuxi info
Nuxi 3.6.2                                                                                                                                                                16:43:20
                                                                                                                                                                          16:43:20
RootDir: D:/work/projects/userquin/GitHub/userquin/vuetify-nuxt-module-main-2                                                                                             16:43:20
Nuxt project info:                                                                                                                                                        16:43:20

------------------------------
- Operating System: Windows_NT
- Node Version:     v18.16.0
- Nuxt Version:     3.6.2
- Nitro Version:    2.5.2
- Package Manager:  pnpm@8.6.9
- Builder:          vite
- User Config:      -
- Runtime Modules:  -
- Build Modules:    -
------------------------------

Reproduction

https://github.com/userquin/vuetify-nuxt-module/tree/userquin/feat-add-external-vuetify-config-file

Remove the following lines:

Remove the following hook:

Register the paths in nuxt.options.watch (uncomment next line):

Install dependencies pnpm install and run dev server nr dev, open the app in the browser, once the app loaded, change any vuetify config file:

  • playground/vuetify.config.mts: change MyBadge: 'VBadge', to MyXXBadge: 'VBadge',
  • or playground/layers/vuetify-layer/vuetify.config.ts: change MyAvatar: 'VAvatar', to MyXXAvatar: 'VAvatar',

Once changed, the dev server should restart, but it doesn't.

Describe the bug

When adding files to watch in nuxt.options.watch, they should be relative to the srcDir, but the path received in the callback seems to be always absolute paths, and so there is no dev server restart.

Additional context

image

Logs

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0