-
-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import with
broken by vite plugin
#1013
Comments
Thanks for opening this issue! A maintainer will review it soon. |
Hello there @Idrinth, do you think you can provide a reproduction that I can have a look at and then present to the team if need be. You shouldn't be getting the above error at all. |
terribly sorry if the example was too big. will put some time aside to build a smaller one tomorroe |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. |
That shouldn't be the case, issue is still unsolved to my knowledge. |
Hmm, thank you very much for this. Really appreciate this. Let me share this with the team. Sorry for the auto-labelling bot. |
Taking a look at your reproduction now. |
Ok, I fixed it @Idrinth; the issue isn't a Million issue at all. It's an issue with babel and vite I think. So, I did a bit of research around and found a fix: https://stackblitz.com/edit/vitejs-vite-gm2ltv?file=vite.config.ts |
That is using the deprecated |
Oh yes, you are correct. However this issue has nothing to do with Million. It still says the same thing when you remove Million from your codebase. |
In that case my small example is insufficient, will try to replicate the issue in something slightly bigger. My main project works without million and only breaks once adding it :( |
more digging and it looks like there is no way on million's side to fix this. Will have to do some code replacements to byopass the vite issue I guess. |
Yes @Idrinth, thank you very much 🙌 |
was easier than expected, actually just needed to switch to the babel plugin instead - that worked out fine. |
What version of
million
are you using?3.0.6
Are you using an SSR adapter? If so, which one?
none
What package manager are you using?
npm
What operating system are you using?
Windows+Linux
What browser are you using?
Chromium, Firefox
Describe the Bug
is compiled wrongly, breaking it, because the
{
and}
get removed. This errors out in the following build step.What's the expected result?
The plugin does not remove required curly braces
Link to Minimal Reproducible Example
https://stackblitz.com/edit/vitejs-vite-azcm9h
Participation
The text was updated successfully, but these errors were encountered: