From 51e091d26eb4e38bf3c60134dd783e5509dfa7e3 Mon Sep 17 00:00:00 2001 From: Dimasik Kolezhniuk Date: Tue, 10 Oct 2023 16:20:20 +0200 Subject: [PATCH] Add explanation to browser.esm build --- rollup.browser.esm.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rollup.browser.esm.config.js b/rollup.browser.esm.config.js index 213ce0e..74db36c 100644 --- a/rollup.browser.esm.config.js +++ b/rollup.browser.esm.config.js @@ -17,9 +17,13 @@ export default [ preventAssignment: true, changed: "replaced", delimiters: ["", ""], + /* + * The following variable replaces to true in the build in the similar way as snarkjs does. + * https://github.com/iden3/snarkjs/blob/ef9042451f98f254b520b8ce9b9544a849e90a5d/config/rollup.iife.config.js + */ "process.browser": true, /* - Because of some frontend frameworks uses monkey patching to track UI changes or other purposes (including Angular, AngularJS, Ember.js, JQuery...), it's important to make sure that the thread function is not modified by the framework and passing in the web worker as it is. + Because of some frontend frameworks uses monkey patching to track UI changes or other purposes (including Angular, AngularJS, Ember.js, JQuery...), it's important to make sure that the thread function is not modified by the framework and passing in the web worker as it is. */ "thread.toString()": JSON.stringify(thread.toString()), }),