From 8d0cfab927d0f9456ecfa061f35a2039e6e3018e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Biel?= Date: Fri, 1 Mar 2024 23:32:59 +0100 Subject: [PATCH] Allow overriding output in loader options --- README.md | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e308016..fd91a41 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ const loaderConfig = { bundle: false, warnings: true, watch: false, // indicates if webpack is in watch mode - output: 'output', + output: 'output', // if not specified and spago = true, then as reported by `spago path output` src: [ path.join('src', '**', '*.purs'), // if pscPackage = true diff --git a/src/index.js b/src/index.js index ff13302..2e075bb 100644 --- a/src/index.js +++ b/src/index.js @@ -139,7 +139,7 @@ module.exports = function purescriptLoader(source, map) { } })(loaderOptions.pscPackage, loaderOptions.spago); - const outputPath = loaderOptions.spago ? getSpagoSources() : 'output' + const outputPath = loaderOptions.output || (loaderOptions.spago ? getSpagoSources() : 'output') const options = Object.assign({ context: webpackContext,