Skip to content
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

fix: make aztec.js bundleable by vite #10744

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

olehmisar
Copy link
Contributor

Fixes #6073

@Thunkar
Copy link
Contributor

Thunkar commented Dec 16, 2024

Hi!

This is going to be addressed by #10704, which also starts a bigger refactor and code split that will make our libraries way more browser friendly.

Hopefully I can get that one in today to unblock you!

@olehmisar
Copy link
Contributor Author

@Thunkar please close this PR, if it was addressed in yours

@olehmisar
Copy link
Contributor Author

I merged master and see that import { sep } from "path" is still present. This will crash vite build.

@Thunkar
Copy link
Contributor

Thunkar commented Dec 18, 2024

I merged master and see that import { sep } from "path" is still present. This will crash vite build.

@olehmisar path still has to be polyfilled, how is vite build crashing?

@olehmisar
Copy link
Contributor Author

IDK. Vite just fails because it can’t destructure sep from path. Not destructuring fixes the issue for some reason. Idk why but it worked for me

@Thunkar
Copy link
Contributor

Thunkar commented Dec 18, 2024

@olehmisar have you tried the polyfills package I used here?

@olehmisar
Copy link
Contributor Author

@Thunkar
Copy link
Contributor

Thunkar commented Dec 18, 2024

I'll try your plugin with our vite box tomorrow and try to debug. The polyfill should support destructuring.

@olehmisar
Copy link
Contributor Author

I feel like too much of your time is being wasted on such a simple fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

building SSR with vite fails due to fs/promises
2 participants