Closed phlegx closed 3 weeks ago
I've just encountered this problem as well with another package, resulting in this build error:
[commonjs--resolver] Unexpected keyword 'false' (55:5) in C:/Snaps/pwp/pwp-ui/node_modules/@carbon/react/es/components/ModalWrapper/ModalWrapper.js
file: node_modules/@carbon/react/es/components/ModalWrapper/ModalWrapper.js:55:5
55: if(false) {
^
The false
on line 55 should be __DEV__
The vite-ssr code mentions that this is a workaround for a bug in Vite v2.6.0: https://github.com/frandiox/vite-ssr/blob/650435fc9e6104b998cb261c574037228e9add64/src/plugin.ts#L34 Seems like that bug was fixed in v2.8.0? https://github.com/vitejs/vite/pull/5515
FYI We're curently using Vite v4.5.3
Tested out @phlegx's suggestion by manually updating the __DEV__
references in node_modules/vite-ssr
to use __VITE_SSR_DEV__
instead, and the problem is solved. Is this an acceptable solution @frandiox? I can cut a PR for this, as we need this fix
No response from the repo owner after pinging them in this ticket, via their personal website, and via DM on twitter. Not sure what we can do here if the owner is unavailable. The last commit that was merged was over a year ago, has this repo/project been abandoned?
thx @frandiox! :muscle:
Should be released in 0.17.2, sorry for the delay!
Don't worry! The important thing is to keep going.
PR teleport and unhead are also important. Please take a look on it!
Hi!
Using the following code in plugins.ts breaks
@elastic/apm-rum-core
package:See @elastic/apm-agent-rum-js/issues/1372
Maybe using a more package specific naming like
__VITE_SSR_DEV__
could be very useful.