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

Wrong path when bundling tiny-secp256k1 with Electron #92

Open
electic opened this issue Oct 6, 2022 · 1 comment
Open

Wrong path when bundling tiny-secp256k1 with Electron #92

electic opened this issue Oct 6, 2022 · 1 comment

Comments

@electic
Copy link

electic commented Oct 6, 2022

Hello,

First off thank you for making this library. Secondly, we are having issues bundling this with Electron and Electron Builder. The issue is that during the bundling process the following file:

wasm_path.js uses import.meta.url.

Using webpack, when it is packaged and built, it uses the path of the wasm file on the build machine. Instead of the where it is relative to where it running on the target machine. Disabling that behavior in webpack using:

 module: {
        parser: {
            javascript : { importMeta: false }
        }
    }

Does not seem to work because it then throws another error that import.meta.url cannot be used outside of a module. I have a feeling others will run into this issue. For now, we have copied the wasm file out and patched the file to look for it relative to the installation path. Any help here appreciated. Happy to help debug.

@iknowhtml
Copy link

@electic, I believe I am running into the same issue you are. Is it possible for you to share a redacted version of your solution?

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

No branches or pull requests

2 participants