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

Artifact naming convention incompatible with vite #746

Open
kanej opened this issue Apr 29, 2024 · 2 comments
Open

Artifact naming convention incompatible with vite #746

kanej opened this issue Apr 29, 2024 · 2 comments
Labels
status:needs-decision We need to make a decision about this

Comments

@kanej
Copy link
Member

kanej commented Apr 29, 2024

We export artifacts based on the future id, which includes the # symbol as a separator:

image

When imported via vite it fails to resolve the import:

[vite] Internal server error: Failed to resolve import ...

This was first raised on discord: https://discord.com/channels/750408878008827925/1153426756901032037/1234168682490364017

@kanej kanej added status:needs-decision We need to make a decision about this and removed status:triaging labels Apr 29, 2024
@kanej
Copy link
Member Author

kanej commented Apr 29, 2024

Looking at vite, they seem to have made the call not to support # in file paths:

vitejs/vite#13123

@zoeyTM
Copy link
Contributor

zoeyTM commented Jun 3, 2024

I think we should consider adding an hre.ignition.getArtifact or hre.artifacts.readIgnitionArtifact or similar to hardhat v3

Maybe even a separate utility function not attached to anything, in case a user doesn't want to import the entire hre just for that function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs-decision We need to make a decision about this
Projects
Status: Todo
Development

No branches or pull requests

2 participants