vite-plugin/vite-plugin-commonjs

[feature request] support "exports = module.exports = {xxx}" syntax

fifv opened this issue · 2 comments

fifv commented

A lib use this syntax to export, then error occurs.
image
image
This can be fixed by manually changing to module.exports = {xxx}, but it would be better that this syntax can be used as is.

This plugin makes my life easier, with thanks.

👋
Now, you can try use v0.6.1.
One thing to note.

// ❌ `exports` exported members are dynamic.
// import { cjs } from './cjs'
// ✅
import cjs from './cjs'

fifv commented

It works! Thanks a lot💕