Skip to content

Commit

Permalink
Add support for ELM_DEBUG env var
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanWinther committed Nov 1, 2023
1 parent 12f36aa commit 1c4ad06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This is the UI you see when you type `ui` into `ucm`.

4. Visit `http://localhost:1234` in a browser.

> 💡 Set the environment variable `ELM_DEBUG=1` before starting the dev server to enable Elm's time-travelling debugger.
## Dependencies

This depends on the [ui-core package](https://github.com/unisonweb/ui-core) via
Expand Down
3 changes: 2 additions & 1 deletion webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const postcssPresetEnv = require("postcss-preset-env");
const FaviconsWebpackPlugin = require("favicons-webpack-plugin");

const API_URL = process.env.API_URL || "127.0.0.1:8080";
const ELM_DEBUG = process.env.ELM_DEBUG || false;
const UI_CORE_SRC = "elm-stuff/gitdeps/github.com/unisonweb/ui-core/src";

module.exports = {
Expand Down Expand Up @@ -63,7 +64,7 @@ module.exports = {
{
loader: "elm-webpack-loader",
options: {
debug: false,
debug: ELM_DEBUG,
cwd: __dirname,
},
},
Expand Down

0 comments on commit 1c4ad06

Please sign in to comment.