devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Add an option to warn/list imported cjs modules

Open tobiasdiez opened this issue 2 years ago • 1 comments

Describe the feature

Since it's not always clear if a given library is imported via esm or cjs (or even properly supports esm), it would be nice to have a command that deeply analyzes all imports and lists all cjs ones.

Reference: https://github.com/rollup/plugins/tree/master/packages/commonjs#inter-plugin-communication

Additional information

  • [ ] Would you be willing to help implement this feature?
  • [ ] Could this feature be implemented as a module?

Final checks

tobiasdiez avatar Mar 19 '23 15:03 tobiasdiez

In the future, once https://github.com/nuxt/devtools supports build mode, we could have a page from https://github.com/antfu/vite-plugin-inspect or other analyzers to list cjs/esm dependencies bundled.

antfu avatar Mar 20 '23 10:03 antfu