Open jaskp opened 2 months ago
Vite has made changes to how it handles define
, did you try this?
define: {foo: '"bar"'}
Certain values do avoid the error, but unfortunately I need define: {global: 'globalThis'}
, i.e. replacing an identifier with another identifier, not a string literal.
Summary
Adding
define
entries to vite configs breaks compilation with the following error:Reproduction
Use the
react-ts
template and add adefine
entry to the vite config, for example:Environment