Allow configuring the location of the .dfx generated code for asset canisters

Currently dfx build generates a lot of code for asset canisters, and stores it in a non-configurable location (I assume, I haven’t found a way to change the location). This is making it difficult to get import aliases to work with Snowpack (I don’t think it’s necessarily a Snowpack-specific issue), because the generated code is multiple directories above the directory of the canister that I have Snowpack installed in.

I would like to treat each frontend canister directory as a standalone application, with its own package.json, and not being able to configure the location of the generated asset canister code is making that difficult.

1 Like

These are still solid points, and I think I have a proposed solution that should help. My plan is still to implement a dfx generate command with configurable output directories per-canister.

3 Likes