How to set source-directories when running elm-reactor

479 views Asked by At

How do I specify areas for looking up Module names in elm-reactor, current it says

I cannot find module 'MyModule'.

1

There are 1 answers

2
Sidney On BEST ANSWER

In your elm-package.json file, using the "source-directories" key. I believe the default is [ "." ], so by default it will look in the same directory as the elm-package.json file.

{
    "source-directories": [
        "."
    ]
}

You can change it to [ "src" ] or even add multiple paths, since it's an array.