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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: upgrade nitropack #324

Merged
merged 32 commits into from
Jul 8, 2022
Merged

fix!: upgrade nitropack #324

merged 32 commits into from
Jul 8, 2022

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented May 1, 2022

πŸ”— Linked issue

resolves #322, resolves #31, resolves #32, resolves #375, resolves #356

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This upgrades nitropack which should fix a few issues on the books at the moment. Also note #316 which could be combined with this one.

Breaking change: nuxi generate now behaves differently using nitro prerendering instead of the Nuxt 2 full-static approach. If you would like to keep the Nuxt 2 generation logic while still using nitro, you can run nuxi generate --classic or set bridge.nitroGenerator.

Progress:

  • upgrade nitropack
  • native nuxi generate prerendering - ssr & spa
  • fix nuxt 2 SSG/static behaviour (currently broken - renders pages with 503 unavailable)

πŸ‘‰ Migration

If you would like to keep the Nuxt 2 generation logic while still using nitro, you can run nuxi generate --classic or set bridge.nitroGenerator.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working nitro labels May 1, 2022
@danielroe danielroe requested a review from pi0 May 1, 2022 11:04
@danielroe danielroe self-assigned this May 1, 2022
@danielroe danielroe marked this pull request as draft May 1, 2022 11:09
@danielroe danielroe marked this pull request as ready for review May 1, 2022 11:12
@danielroe danielroe marked this pull request as draft May 1, 2022 11:22
@Luferov
Copy link
Contributor

Luferov commented May 11, 2022

@pi0, what about this PR? If you accept it, it will be great, please! πŸ™β€οΈ

@danielroe danielroe changed the title fix: upgrade nitropack fix!: upgrade nitropack May 31, 2022
@dargmuesli
Copy link
Member

Hey @danielroe, can we help somehow to get this done?
I know about the priority on nuxt/framework, but this is really the major issue with bridge right now, sadly. Having a P4 resolved would allow for a much better experience.
Could we maybe have a little chat besides that exact issue on Discord because @pi0 is currently busy with other things? Feel free to tell me what fits for you!

@pi0
Copy link
Member

pi0 commented Jun 20, 2022

@danielroe is also maintainer of this repo :) There is no need for my approval πŸ‘πŸΌ

@danielroe
Copy link
Member Author

danielroe commented Jun 20, 2022

Yes, this is my delay, not @pi0's! Feel free to ping me on Discord and we can chat πŸ˜‰

@cb-velmurugan
Copy link

@danielroe Is there any ETA for #32 issue because we need .html for deployment.

@Luferov

This comment was marked as off-topic.

@danielroe danielroe marked this pull request as ready for review July 2, 2022 10:08
@danielroe danielroe force-pushed the fix/nitropack branch 2 times, most recently from f4e8601 to 5104137 Compare July 4, 2022 22:01
Copy link
Member

@dargmuesli dargmuesli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference in output for me is now - kind of obviously - that the sitemap, robots and i18n modules' outputs are missing now. Otherwise it works great!

@P4sca1
Copy link

P4sca1 commented Jul 6, 2022

@dargmuesli Were you able to test nuxt route middleware?

  • Does the suffix .global.ts now add the middleware automatically?
  • Does useNuxtApp() now work inside a middleware?

@dargmuesli
Copy link
Member

@P4sca1 are you asking whether #375 is fixed? I only checked for .output generation yet.

@P4sca1
Copy link

P4sca1 commented Jul 6, 2022

Alright, I will check the other 2 issues I currently have after the PR has been merged.

@dargmuesli
Copy link
Member

In case anyone else wants to test this fix too for their project, here are the steps to do so in your project:

  1. clone the bridge repo
  2. checkout the fix/nitropack branch
  3. run yarn install, yarn build and yarn pack
  4. in your project, replace the bridge import with "@nuxt/bridge": "file:...../nuxt-bridge/nuxt-bridge-v3.0.0.tgz",
  5. build your project
  6. check the results!

I'd be fine with a soon merge of this PR of course. I can't imagine it breaking more than what already broke? 🀭

@dargmuesli
Copy link
Member

dargmuesli commented Jul 6, 2022

@danielroe you write

If you were relying on the previous full static generation of Nuxt, you should switch to using nuxt generate rather than nuxi generate...

Would you mind explaining the reason why that is recommended? I suppose nuxi is missing static rendering capabilities partly?

@danielroe
Copy link
Member Author

It's likely there are remaining issues, but I think this PR is sufficient to enable us to test and iterate with edge releases.

Thank you to everyone who has tested it so far - please let me know in a new issue if you are experiencing any issues ❀️

@danielroe danielroe merged commit 2dfed6a into main Jul 8, 2022
@danielroe danielroe deleted the fix/nitropack branch July 8, 2022 11:54
@MartinX3
Copy link

MartinX3 commented Jul 8, 2022

Hmm, I don't see anything special about

@dargmuesli
I think the texteditor showed us the wrong position.
The browser console shows me the real position of the invalid character.
v=t.d*n+t.m*o+t.n*l+t.f*c+t.ω*d,[s,y]=r.b.sincos(v);
at
ω

Without ssr it's somehow generating .js files with garbage characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nitro
Projects
None yet
7 participants