NomicFoundation/hardhat-ignition

Artifact naming convention incompatible with vite

kanej opened this issue · 2 comments

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

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

vitejs/vite#13123

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