Home

Awesome

purescript-webpack-example

Example project using PureScript with webpack.

Installation

bower install
npm install

Running

Using locally installed binaries

On most system this should be enough, because npm should take care of extra depedencies, including purescript and purescript-psa. Note, that this will use the compiler from node_modules/.bin/, not the one that might have installed globally or the one that may be present in your $PATH. This will fail on systems like Nix, where you'll need to use globally installed binaries (patched version of psc, while npm will supply unpatched version).

npm run webpack
npm start

To test this in the browser with the webpack-dev-server.

bower install

npm install

# http://localhost:4008/
npm run webpack:server

Using globally installed binaries

npm install should have installed extra binary dependencies required to run this example to node_modules/.bin. However, if you want to use the psc compiler that you have installed globally (i.e., the one in $PATH), you can just call webpack directly:

webpack

As always, you can use webpack --watch option to enable automatic recompilation on file changes.

However, if you want to use globally installed binaries, this means that you'll have to take care of all binary dependencies yourself. Right now, this includes having in your $PATH:

Additional examples