Skip to content

Commit e93d25a

Browse files
authored
Merge pull request #190 from tzemanovic/build-with-debugger
Build with debugger
2 parents 5b40512 + 686e19e commit e93d25a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

config/webpack.config.prod.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ module.exports = {
112112
// Use the local installation of elm-make
113113
loader: require.resolve('elm-webpack-loader'),
114114
options: {
115+
// If ELM_DEBUGGER was set to "true", enable it. Otherwise
116+
// for invalid values, "false" and as a default, enable it
117+
debug: process.env.ELM_DEBUGGER === 'true' ? true : false,
115118
pathToMake: paths.elmMake
116119
}
117120
}

template/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can find the most recent version of this guide [here](https://github.com/hal
1919
- [repl](#repl)
2020
- [make](#make)
2121
- [reactor](#reactor)
22-
- [Turning off Elm Debugger](#turning-off-elm-debugger)
22+
- [Turning on/off Elm Debugger](#turning-on-off-elm-debugger)
2323
- [Changing the Page `<title>`](#changing-the-page-title)
2424
- [Adding a Stylesheet](#adding-a-stylesheet)
2525
- [Post-Processing CSS](#post-processing-css)
@@ -162,9 +162,11 @@ Alias for [elm-make](http://guide.elm-lang.org/get_started.html#elm-make)
162162
Alias for [elm-reactor](http://guide.elm-lang.org/get_started.html#elm-reactor)
163163

164164

165-
## Turning off Elm Debugger
165+
## Turning on/off Elm Debugger
166166

167-
To turn off Elm Debugger, set `ELM_DEBUGGER` environment variable to `false`
167+
By default, in production (`elm-app build`) the Debugger is turned off and in development mode (`elm-app start`) it's turned on.
168+
169+
To turn on/off Elm Debugger explicitly, set `ELM_DEBUGGER` environment variable to `true` or `false` respectively.
168170

169171
## Changing the base path of the assets in the HTML
170172

0 commit comments

Comments
 (0)