devtools
devtools copied to clipboard
Add an option to warn/list imported cjs modules
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
- [X] Read the contribution guide.
- [X] Check existing discussions and issues.
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.