-
-
Notifications
You must be signed in to change notification settings - Fork 336
Add Nitro plugin #1415
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
base: main
Are you sure you want to change the base?
Add Nitro plugin #1415
Conversation
webpro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Lynn! Nice one, happy to merge. Added a few notes, but nothing major, I think.
| @@ -0,0 +1,3 @@ | |||
| { | |||
| "ignore": [".nitro/types/*.d.ts"] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, users don't need to add this to their configuration.
We can add it to entry patterns in the plugin so the type definitions are added to the TS program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
|
||
| const title = 'Nitro'; | ||
|
|
||
| const enablers = ['nitropack']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between https://www.npmjs.com/package/nitro and https://www.npmjs.com/package/nitropack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitro is the new package for Nitro v3, nitropack is the package for v2 (the current stable release).
Now that you mention it, do you think it'd make sense for this plugin to support both v2 and v3, even though v3 isn't stable yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think the plugin implementation is largely the same for both the nitro and nitropack enablers, I think it makes sense to have just a single plugin
If they're quite different or if they should really have their own distinct title, then we should split it up I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though v3 isn't stable yet?
From a Knip perspective this is likely stable enough?
| } | ||
| }, | ||
| "include": ["./nitro.d.ts", "../../**/*", "../../server/**/*"] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need all the TS configuration to cover the plugin's functionality properly? Path aliases, for instance, are covered elsewhere already. Please minimize to the essentials, if at all possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Adds a plugin for Nitro.