-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior Change in Public Directory Path Resolution Since @slidev/cli@0.48.0-beta.4 #1401
Comments
Thank you for your quick reply :) . What should this minimal package.json contain. Does this mean that I'll have to "pollute" my slides directory with node_modules files on the side? |
I think |
Thanks for your help. That was what i first try but it does not seems to work. I have :
|
Could you share how you start Slidev dev server? |
I was using :
but going inside the slide directory and doing :
seems to work. I am not sure why. The only downside is that i have to have a package.json in my slide directory :) For the context, i am trying to have all slidev env in a docker env : https://github.com/Ynn/slides.tools . Contrary to what I will try that and mark as fix if it works well. Would it be possible to have an option to change the root from the cli ? This way a package.json wouldn't be needed. |
Thank you for pointing this out. I know what the problem is now. Currently, the user root is the closest folder to cwd I think there are 3 possible resolving modes.
We also need to find the user's @antfu, I am not very sure. |
I would prefer to keep the original directory of slides.md approach. Later in the slides.md we could have a ---
rootDir: ..
--- to override that if needed |
2. Fix rooting issues : slidevjs/slidev#1401 3. Use node user
I upgraded from @slidev/cli@0.48.0-beta.1 to @slidev/cli@0.48.0-beta.24 and noticed a change in behavior. So, I tested all versions between 1 and 24, and it seems that this change occurred starting from @slidev/cli@0.48.0-beta.4.
Before this change, I could have a slidev directory in which I installed everything, and a subdirectory called slides where I had my folders:
My images and style.css file were found without any problems, and I could even have components in the slides folder that were also found.
Since version @slidev/cli@0.48.0-beta.4, the public folder is no longer mounted from
slidev/slides/public
but fromslidev/public
only. This means I have to move my files there.This is not convenient for me because I find it much clearer to separate presentations into different folders while keeping the theme and slidev in the main directory.
I also tested version 0.47.5, and it works as I wanted.
I suspect this might be due to one of these changes:
Is this new behavior intended? What can I do to revert to the previous situation?
The text was updated successfully, but these errors were encountered: