From 1f449b874a7e1aa3b36efdf1765f29c00dc79af8 Mon Sep 17 00:00:00 2001 From: Robin Heggelund Hansen Date: Wed, 26 Aug 2020 20:52:10 +0200 Subject: [PATCH] Fix runtime error. --- example/webpack.config.js | 5 +---- index.js | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/example/webpack.config.js b/example/webpack.config.js index 1d082fd..1342bee 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js @@ -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' } ] }, diff --git a/index.js b/index.js index 72386e5..834a527 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,6 @@ var getFiles = function(options) { var getOptions = function(mode) { var defaultOptions = { debug: mode === "development", - verbose: mode === "development", optimize: mode === "production", }; @@ -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); });