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 CommonJS build #1006

Merged
merged 3 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
_Security_ in case of vulnerabilities.
-->

## [Unreleased](https://github.com/o1-labs/snarkyjs/compare/2d2af219c...HEAD)
## [Unreleased](https://github.com/o1-labs/snarkyjs/compare/544489609...HEAD)

> No unreleased changes yet

## [0.11.3](https://github.com/o1-labs/snarkyjs/compare/2d2af219c...544489609)

### Fixed

- Fix commonJS version of SnarkyJS, again https://github.com/o1-labs/snarkyjs/pull/1006

## [0.11.2](https://github.com/o1-labs/snarkyjs/compare/c549e02fa...2d2af219c)

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "snarkyjs",
"description": "TypeScript framework for zk-SNARKs and zkApps",
"version": "0.11.2",
"version": "0.11.3",
"license": "Apache-2.0",
"homepage": "https://github.com/o1-labs/snarkyjs/",
"keywords": [
Expand Down
7 changes: 6 additions & 1 deletion src/build/buildNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ function makeJsooExternal() {
name: 'plugin-external',
setup(build) {
build.onResolve({ filter: isJsoo }, ({ path: filePath, resolveDir }) => ({
path: path.resolve(resolveDir, filePath),
path:
'./' +
path.relative(
path.resolve('.', 'dist/node'),
path.resolve(resolveDir, filePath)
),
external: true,
}));
},
Expand Down
Loading