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

Compiles but does not execute anything #129

Open
GCrispino opened this issue Aug 4, 2019 · 2 comments
Open

Compiles but does not execute anything #129

GCrispino opened this issue Aug 4, 2019 · 2 comments

Comments

@GCrispino
Copy link

Hi! I've set up an example project with pulp init with purs version 13 and pulp version 13.0.0 to try to get purs-loader to work. It compiles with no errors but the bundled code does not execute anything. These are my devDependecies in package.json:

{
  ...
  "devdependencies": {
    "psa": "^1.0.0",
    "purescript": "^0.13.2",
    "purs-loader": "^3.6.0",
    "webpack": "^4.39.1",
    "webpack-cli": "^3.3.6",
    "webpack-dev-server": "^3.7.2"
  }
  ...
}

I'm using the webpack.config.js from the purescript-webpack-example repository.

The project contains just a simple hello world log statement, but if you want to take a look I created this repository.

@ethul
Copy link
Owner

ethul commented Aug 17, 2019

I believe that you just need to run your effect using something like unsafePerformEffect.

@GCrispino
Copy link
Author

That worked! Just now I realized that the example in purescript-webpack-example is written this way, I'm sorry...
But if I can ask, why does it have to be this way? When using pulp we just have to declare main as a function that returns a Effect Unit, without having to use unsafePerformEffect.

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