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 avatar path resolution in dev-env #3266

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Conversation

rafaelbsky
Copy link
Contributor

@rafaelbsky rafaelbsky commented Dec 18, 2024

The avatar path is currently dependent on the CWD. So it might not work if executed from a different place, e.g., when using @atproto/dev-env as a dependency on another project.

A related but separate issue is that the img folder is not copied to dist/ on build.

This PR moves the images to an assets folder outside src and accesses it in a non-CWD-dependent way.

Copy link
Contributor

@matthieusieben matthieusieben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I typically like to put "assets" in an assets folder (next to src). This way, if src gets discarded from the published package, the assets can still be bundled.

Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable way to get this working in the short/med-term 👍

@rafaelbsky rafaelbsky merged commit 638f5a8 into main Dec 19, 2024
10 checks passed
@rafaelbsky rafaelbsky deleted the denv-env-avatar-path-fix branch December 19, 2024 14:25
@github-actions github-actions bot mentioned this pull request Dec 18, 2024
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.

3 participants