-
Notifications
You must be signed in to change notification settings - Fork 188
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
[BUG] Compiling using --profile=release
leads to runtime errors
#1514
Comments
There seem to be an issue with the printing of some es6 construct. Can you list all the js files that your bundle in your app ? |
The issue is a newline right after an
|
It is a little bit hard since we built using NPM, but here are the two bundled files (I guess) : |
* The async keyword should not be followed by a newline Fixes #1514 * more fix for async * Changes --------- Co-authored-by: Hugo Heuzard <hugo.heuzard@gmail.com>
Describe the bug
At @funkywork, we're working on a collection of tools to interact with Tezos. We recently realized that when using our libraries, producing JavaScript artifacts with the
release
profile generates incorrect JavaScript output. For example, in this project (I think it's pretty minimal): https://github.com/funkywork/tezos-dapps-examples/tree/main.Using
dune build; dune exec bin/server/dapps.exe
and going to http://localhost:8888/dapps/connect launch properly the apps. But if you rundune build --profile=release; dune exec bin/server/dapps.exe
you will have an error console:And here is the client.bc.js generated: https://gist.githubusercontent.com/xvw/d679d490d085e671f926e106cfff37b5/raw/69c2c552065c0466a93a4c05b323ccf75c6ef01a/client.bc.js
From a development point of view, this isn't a problem, but it does make it difficult to put things into production, as the non-release bundle weighs in at ~16mb, compared with ~2mb for release.
If I can provide any additional information, or create a smaller example, please don't hesitate to ask!
Versions
ocaml
:5.0.0
js_of_ocaml
:5.4.0+git-e0d000e-dirty
The text was updated successfully, but these errors were encountered: