You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modifying user config dependencies do not trigger the dev server to restart on windows.
Description
resolveDevUserConfig.ts contains a method resolveDeps which does not work on windows because the paths are not in the correct format. The filename passed into the method is in the format C:/dev/src/.../docs/.vuepress/config.js, whereas the require.cache is in the format C:\\dev\\src\\...\\docs\\.vuepress\\config.js.
Steps to reproduce
Create a config.js file which requires another dependency. Modify the dependency. The dev server does not restart.
Expected behavior
The dev server to restart.
Screenshots
Not applicable
Environment info
Browser: Firefox
Output of vuepress info:
System:
OS: Windows 10
...
npmPackages:
@vuepress/bundler-vite: 2.0.0-beta.32
@vuepress/bundler-webpack: Not Found
@vuepress/cli: 2.0.0-beta.32
@vuepress/client: 2.0.0-beta.32
@vuepress/core: 2.0.0-beta.32
@vuepress/markdown: 2.0.0-beta.32
@vuepress/plugin-active-header-links: 2.0.0-beta.32
@vuepress/plugin-back-to-top: 2.0.0-beta.32
@vuepress/plugin-container: 2.0.0-beta.32
@vuepress/plugin-debug: Not Found
@vuepress/plugin-docsearch: Not Found
@vuepress/plugin-external-link-icon: 2.0.0-beta.32
@vuepress/plugin-git: 2.0.0-beta.32
@vuepress/plugin-google-analytics: Not Found
@vuepress/plugin-medium-zoom: 2.0.0-beta.32
@vuepress/plugin-nprogress: 2.0.0-beta.32
@vuepress/plugin-palette: 2.0.0-beta.32
@vuepress/plugin-prismjs: 2.0.0-beta.32
@vuepress/plugin-pwa: Not Found
@vuepress/plugin-pwa-popup: Not Found
@vuepress/plugin-register-components: Not Found
@vuepress/plugin-search: 2.0.0-beta.32
@vuepress/plugin-shiki: Not Found
@vuepress/plugin-theme-data: 2.0.0-beta.32
@vuepress/plugin-toc: Not Found
@vuepress/shared: 2.0.0-beta.32
@vuepress/theme-default: 2.0.0-beta.32
@vuepress/utils: 2.0.0-beta.32
vue: 3.2.26
vue-loader: Not Found
vue-router: 4.0.12
vuepress: ^2.0.0-beta.32 => 2.0.0-beta.32
vuepress-vite: 2.0.0-beta.32
vuepress-webpack: Not Found
The text was updated successfully, but these errors were encountered:
I think that it is already using path.normalize earlier in the chain - and that's the issue. The path library being uses always creates linux style paths, whereas require.cache will always use the OS's path style
Bug report
Modifying user config dependencies do not trigger the dev server to restart on windows.
Description
resolveDevUserConfig.ts
contains a methodresolveDeps
which does not work on windows because the paths are not in the correct format. Thefilename
passed into the method is in the formatC:/dev/src/.../docs/.vuepress/config.js
, whereas therequire.cache
is in the formatC:\\dev\\src\\...\\docs\\.vuepress\\config.js
.Steps to reproduce
Create a
config.js
file whichrequire
s another dependency. Modify the dependency. The dev server does not restart.Expected behavior
The dev server to restart.
Screenshots
Not applicable
Environment info
vuepress info
:System: OS: Windows 10 ... npmPackages: @vuepress/bundler-vite: 2.0.0-beta.32 @vuepress/bundler-webpack: Not Found @vuepress/cli: 2.0.0-beta.32 @vuepress/client: 2.0.0-beta.32 @vuepress/core: 2.0.0-beta.32 @vuepress/markdown: 2.0.0-beta.32 @vuepress/plugin-active-header-links: 2.0.0-beta.32 @vuepress/plugin-back-to-top: 2.0.0-beta.32 @vuepress/plugin-container: 2.0.0-beta.32 @vuepress/plugin-debug: Not Found @vuepress/plugin-docsearch: Not Found @vuepress/plugin-external-link-icon: 2.0.0-beta.32 @vuepress/plugin-git: 2.0.0-beta.32 @vuepress/plugin-google-analytics: Not Found @vuepress/plugin-medium-zoom: 2.0.0-beta.32 @vuepress/plugin-nprogress: 2.0.0-beta.32 @vuepress/plugin-palette: 2.0.0-beta.32 @vuepress/plugin-prismjs: 2.0.0-beta.32 @vuepress/plugin-pwa: Not Found @vuepress/plugin-pwa-popup: Not Found @vuepress/plugin-register-components: Not Found @vuepress/plugin-search: 2.0.0-beta.32 @vuepress/plugin-shiki: Not Found @vuepress/plugin-theme-data: 2.0.0-beta.32 @vuepress/plugin-toc: Not Found @vuepress/shared: 2.0.0-beta.32 @vuepress/theme-default: 2.0.0-beta.32 @vuepress/utils: 2.0.0-beta.32 vue: 3.2.26 vue-loader: Not Found vue-router: 4.0.12 vuepress: ^2.0.0-beta.32 => 2.0.0-beta.32 vuepress-vite: 2.0.0-beta.32 vuepress-webpack: Not Found
The text was updated successfully, but these errors were encountered: