Skip to content

resolvedUrls is null in plugin's configureServer #15438

@yuan116

Description

@yuan116

Describe the bug

Hi, I am developing a plugin for my own use
and found out the resolvedUrls is still null in plugin's configureServer after server restarted, but the printrUrls working fine

Environment:
node: v21.2.0
npm: 9.5.0

this is the little hack that I use to retrieve after server listen
Screenshot 2023-12-06 at 17 29 00

before server restart
Screenshot 2023-12-06 at 17 35 39

after server restart
Screenshot 2023-12-06 at 17 35 54

Reproduction

https://stackblitz.com/edit/vitejs-vite-5chbdo?file=custom-vite-plugin.js

Steps to reproduce

  1. npm run dev
  2. randomly edit the custom-vite-plugins.js, wait for server restart
  3. after server restarted, resolvedUrls is null

System Info

System:
  OS: Linux 5.0 undefined
  CPU: (6) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 0 Bytes / 0 Bytes
  Shell: 1.0 - /bin/jsh
Binaries:
  Node: 18.18.0 - /usr/local/bin/node
  Yarn: 1.22.19 - /usr/local/bin/yarn
  npm: 9.4.2 - /usr/local/bin/npm
  pnpm: 8.10.5 - /usr/local/bin/pnpm
npmPackages:
  vite: ^5.0.8 => 5.0.10

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions