Skip to content

Support custom path-mapped dependencies#78

Open
weijiekoh wants to merge 3 commits intoiden3:masterfrom
weijiekoh:master
Open

Support custom path-mapped dependencies#78
weijiekoh wants to merge 3 commits intoiden3:masterfrom
weijiekoh:master

Conversation

@weijiekoh
Copy link

@weijiekoh weijiekoh commented Mar 25, 2021

This PR allows circom to recognise custom path-mapped dependencies so this works:

circom ./foo.circom -a @customlib=./path/to/customlib/
include "@customlib/bar.circom";

This benefits developers who publish circom files to NPM. The way node_modules is laid out prevents a circom file in one module from correctly importing a circom file in another module. By specifying custom path-maps, developers can sidestep this problem.

It includes a simple Mocha test.

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.

1 participant