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: move vue server plugin out of server/ directory #639

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

danielroe
Copy link
Contributor

We currently apply some protections to help users avoid importing nitro in the vue part of the app and vice versa.

With nuxt/nuxt#25162 we expanded the test cases (and now test for server\/(api|routes|middleware|plugins)\/).

We might relax this regexp (cc: @pi0) as it wasn't originally intended to catch module usage (it might be helpful to keep anyway!) but I spotted that your Nuxt server plugin was in the server/ directory when I think it would more helpfully belong in the plugins/ directory, mirroring a normal Nuxt project.

Checklist:

  • issue number linked above after pound (#)
    • replace "Closes " with "Contributes to" or other if this PR does not close the issue
  • manually checked my feature / checking not applicable
  • wrote tests / testing not applicable
  • attached screenshots / screenshot not applicable

@pi0
Copy link

pi0 commented Jan 17, 2024

We might relax some rules to "warning only" for import protections also reducing chance of breaking Nuxt users by upstream change. but definitely makes sense to refactor this way 👍🏼

Copy link
Contributor

@BracketJohn BracketJohn left a comment

Choose a reason for hiding this comment

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

LGTM & Thanks you two - very nice to proactively apply those changes here (:

@BracketJohn BracketJohn merged commit 10d76d0 into sidebase:main Jan 17, 2024
4 checks passed
@danielroe danielroe deleted the fix/server-plugin branch January 17, 2024 11:42
@flrnt
Copy link
Contributor

flrnt commented Jan 17, 2024

with this fix, it is now possible to build the app without crashing it or silently failed it once in production. A quick patch release would be welcome @zoey-kaiser 😍

@zoey-kaiser
Copy link
Member

zoey-kaiser commented Jan 20, 2024

with this fix, it is now possible to build the app without crashing it or silently failed it once in production. A quick patch release would be welcome @zoey-kaiser 😍

Released in https://github.com/sidebase/nuxt-auth/releases/tag/0.6.5! Sorry for the wait, I was coming home from a trip ❤️

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

Successfully merging this pull request may close these issues.

5 participants