Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

symlink dist/ folder to .output/public/ #499

Open
frankspee opened this issue Dec 27, 2023 · 4 comments
Open

symlink dist/ folder to .output/public/ #499

frankspee opened this issue Dec 27, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@frankspee
Copy link

馃啋 Your use case

When I use nuxt generate I would expect to get a dist folder symlinked to .output/public so that the behaviour of this module is the same as standard Nuxt.

馃啎 The solution you'd like

Do a Nuxt generate, pnpm generate or ionic:build, where ionic build starts a generate (which it doesn't out of the box).

And get a .output/public folder with the correct generated static site, so we can also use that folder. Or that the dist folder is symlinked to the .output/public like it normally does.

It seems to me that there is no reason to do the static site generation different from default Nuxt. It could only introduce bugs or unexpected behaviour for developers / during deployment.

馃攳 Alternatives you've considered

I am currently using the alternative to not use this module and instead use a Nuxt build with the Ionic framework and Capacitor libraries added by myself to the stack. I would love to use this module, but I think it is to WIP / unstable right now.

鈩癸笍 Additional info

No response

@frankspee frankspee added the enhancement New feature or request label Dec 27, 2023
@i4innovationnet
Copy link

Ran into the same issue, couldn't figure out why the dist location was different until I came across this.

@danielroe danielroe removed their assignment Jan 9, 2024
@danielroe
Copy link
Collaborator

The reason this module doesn't do that is that there was an issue with ionic sync: #363. Is that no longer the case?

@danielroe danielroe changed the title feat: dist folder should be symlinked to .output/public like normal nuxt generate symlink dist/ folder should to .output/public/ Jan 9, 2024
@danielroe danielroe changed the title symlink dist/ folder should to .output/public/ symlink dist/ folder to .output/public/ Jan 9, 2024
@frankspee
Copy link
Author

frankspee commented Jan 10, 2024

@danielroe Thank you for linking the issue. I guess we are talking about the ionic cap sync (or npx cap sync after a build).

In my nuxt & ionic without module test project I could not reproduce this issue. Note: I am trying to get this in a codespace or something, but I don't know how to do a ionic/capacitor cli install there.

I did however link the webDir directly to .output/public at first - this is without this module. I tested it today with the symlinked dist folder as well. Sync keeps working even if I do a clean build (removing dist and .output first).

I also tested this with a npx nuxi@latest cleanup and npx nuxi@latest upgrade --force before trying to build and sync again. It just works.

So for me the workaround, whenever dist as webDir in capacitor.config.json is not working, would be to point directly to the .output/public. That looks less code to change by me.

@frankspee
Copy link
Author

I actually tried to revert commit 2dfd31d locally on my machine with a clone of this repository.

I think it works well, so you can test this revert with the PR here: #506

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants