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
We have a Vue JS application with the following file hierarchy :
vue/
.turbo/
dist/
index.html
assets/
...
src/
...
index.html
package.json
...
When trying to serve files from the dist/ directory using the command npx serve dist everything work as intended. However, if I cd into the dist directory from the vue directory and run npx serve . or simply npx serve, the file that is served is vue/index.html instead of vue/dist/index.html (as if the root of the server was vue/ instead of vue/dist/).
I found out that if I delete the vue/package.json file and restart npx serve in vue/dist, the right files are served.
Is this an expected behaviour to use the nearest package.json location as server root ? For me, it seems strange that the root is not the directory from which npx serve . is being executed.
Library version
14.2.3
Node version
18.18.2
The text was updated successfully, but these errors were encountered:
Description
We have a Vue JS application with the following file hierarchy :
When trying to serve files from the
dist/
directory using the commandnpx serve dist
everything work as intended. However, if Icd
into thedist
directory from thevue
directory and runnpx serve .
or simplynpx serve
, the file that is served isvue/index.html
instead ofvue/dist/index.html
(as if the root of the server wasvue/
instead ofvue/dist/
).I found out that if I delete the
vue/package.json
file and restartnpx serve
invue/dist
, the right files are served.Is this an expected behaviour to use the nearest
package.json
location as server root ? For me, it seems strange that the root is not the directory from whichnpx serve .
is being executed.Library version
14.2.3
Node version
18.18.2
The text was updated successfully, but these errors were encountered: