framework icon indicating copy to clipboard operation
framework copied to clipboard

Polyfill cjs globals for vite

Open pi0 opened this issue 4 years ago • 1 comments
trafficstars

Ref nuxt/framework#1835, nuxt/bridge#190

Vite considers source input as native ESM while some dependencies might depend on Node.js/CJS globals like module and global. Doing polyfill can mitigate this potential issue (also making it more consistent with webpack that handles CJS at some level)

We can do it with unenv (#1502) or before that...

pi0 avatar Nov 15 '21 12:11 pi0

+1

abhay-agarwal avatar Apr 29 '22 20:04 abhay-agarwal

+1

LuXDAmore avatar Oct 12 '22 15:10 LuXDAmore