You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the build, Vite-ssg compiles my project in a folder /.vite-ssg-temp/.
At first, it was building as CommonJS and there was no error.
Then, for some reason (maybe updating some dependencies), it started compiling into an ESM format.
This caused many errors and I had to monkey-patch many packages to make the build work.
Now, out of nowhere, it started building again as CJS! I had to remove the changes I did to the packages to make the build work again.
My question is, how does Vite-SSG decides what module format it uses when building a project?
Edit: Ugh, now it's even worse. When running vite (dev), I have to patch the modules. But when running vite-ssg build, the modules must be unaltered, which means I have to reinstall the modules to build locally.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
During the build, Vite-ssg compiles my project in a folder /.vite-ssg-temp/.
At first, it was building as CommonJS and there was no error.
Then, for some reason (maybe updating some dependencies), it started compiling into an ESM format.
This caused many errors and I had to monkey-patch many packages to make the build work.
Now, out of nowhere, it started building again as CJS! I had to remove the changes I did to the packages to make the build work again.
My question is, how does Vite-SSG decides what module format it uses when building a project?
Edit: Ugh, now it's even worse. When running
vite
(dev), I have to patch the modules. But when runningvite-ssg build
, the modules must be unaltered, which means I have to reinstall the modules to build locally.Beta Was this translation helpful? Give feedback.
All reactions