Steps to reproduce:
mkdir explore-bundle-no-main
cd explore-bundle-no-main
spago init
# edit the `src/Main.purs` file to remove the "main" function
spago bundle -m Main -t dist/main.js
Spago doesn't fail with an error that Main.purs does not have a function called main. Thus, the output of the bundle is this:
// Generated by purs bundle 0.12.5
var PS = {};
PS["Main"].main();
One won't realize that the source of their issue is the compiled output until after exploring a few things more.
I only came across this because I used the wrong module name in the spago bundle command.
Steps to reproduce:
Spago doesn't fail with an error that
Main.pursdoes not have a function calledmain. Thus, the output of the bundle is this:One won't realize that the source of their issue is the compiled output until after exploring a few things more.
I only came across this because I used the wrong module name in the
spago bundlecommand.