Replies: 1 comment
-
I found something that works but is this ideal?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm using Vite(v4) with Rails(v6) thru vite_rails gem. Everything work fine in development but when I push to production, it fails on select2 library. The error during the build is
RollupError: "default" is not exported by "node_modules/select2/dist/js/select2.js"
for the codeimport select2 from 'select2';
. If I change the code toimport * as select2 from 'select2';
, then it builds but theselect2
is returned asModule {Symbol(Symbol.toStringTag): 'Module'}
.I've tried various things that I could find on the web for the last couple of days but none of them seems to solve it.
I've tried with/without build.rollupOptions.
My vite.config.js is:
Beta Was this translation helpful? Give feedback.
All reactions