-
Notifications
You must be signed in to change notification settings - Fork 509
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
feat: allow edit of commonJs plugin params #187
Conversation
- add commonjs field to edit the commonjs plugin
src/types/nitro.ts
Outdated
@@ -139,6 +140,7 @@ export interface NitroOptions { | |||
externals: NodeExternalsOptions | |||
analyze: false | PluginVisualizerOptions | |||
replace: Record<string, string | ((id: string) => string)> | |||
commonJs?: RollupCommonJSOptions |
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.
Can you please use commonJS
for naming?
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 π
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! Would be nice to also update docs (config reference to mention this new option)
1a9b45b
to
672b00b
Compare
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!
π Linked issue
nuxt/framework#4762
nuxt/nuxt#13843
β Type of change
π Description
Add the commonJs key to NitroOptions and assign by destructuring nitro.option.commonJs when adding the @rollup/plugin-commonjs.
Would improve the linked PR by avoiding replacing the commonJS plugin at build. The commonJS dynamicRequireTargets declaration would be directly into nitro/nuxt config
π Checklist