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

Recommend consistent order for commonjs and node-resolve plugins #1752

Open
Krinkle opened this issue Jul 28, 2024 · 0 comments
Open

Recommend consistent order for commonjs and node-resolve plugins #1752

Krinkle opened this issue Jul 28, 2024 · 0 comments

Comments

@Krinkle
Copy link

Krinkle commented Jul 28, 2024

  • Rollup Plugin Name: @rollup/commonjs, @rollup/node-resolve
  • Rollup Plugin Version: latest

Documentation Is: Confusing.

Please Explain in Detail...

import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

plugins: [nodeResolve(), commonjs()]

Vs

import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

  plugins: [commonjs(), resolve()]

As an inexperienced user of Rollup, the difference is distracting and giving me reason to be uncertain, thinking that perhaps one of them is wrong or that I'll expose myself to some subtle bug if I do it wrong, or worse, that both are right for different use cases (hoping that's not the case!).

Your Proposal for Changes

If both behave the same, pick one and recommend it the same way in both.
If one has issues, pick the other one.
If both have merit, pick the same one to recommend by default in both packages, and document why/when to deviate.

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

No branches or pull requests

1 participant