Skip to content

Commit

Permalink
Fix runtime error.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinheghan committed Aug 26, 2020
1 parent c908242 commit 1f449b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ module.exports = {
exclude: [/elm-stuff/, /node_modules/],
// This is what you need in your own work
// loader: "elm-webpack-loader",
loader: '../index.js',
options: {
debug: true
}
loader: '../index.js'
}
]
},
Expand Down
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ var getFiles = function(options) {
var getOptions = function(mode) {
var defaultOptions = {
debug: mode === "development",
verbose: mode === "development",
optimize: mode === "production",
};

Expand Down Expand Up @@ -180,9 +179,7 @@ function compile(sources, options) {
if (exitCode !== 0) {
return reject("Compilation failed");
}
else if (options.verbose) {
console.log(output);
}

fs.readFile(info.path, { encoding: "utf8" }, function (err, data) {
return err ? reject(err) : resolve(data);
});
Expand Down

0 comments on commit 1f449b8

Please sign in to comment.