From f8c924a49156139c36d2a510181929028fc75b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Wed, 28 Feb 2018 15:56:45 +0100 Subject: [PATCH] enable source maps in --debug mode --- index.js | 6 +++++- package.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 03669cc..e0c2b0a 100644 --- a/index.js +++ b/index.js @@ -30,7 +30,11 @@ module.exports = function (file, opts) { readdir: readdir } }, - { vars: vars, varModules: { path: path } } + { + vars: vars, + varModules: { path: path }, + sourceMap: opts && (opts.sourceMap || opts._flags && opts._flags.debug) + } ); return sm; diff --git a/package.json b/package.json index f67a587..1df2379 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dependencies": { "quote-stream": "^1.0.1", "resolve": "^1.1.5", - "static-module": "^2.1.1", + "static-module": "^2.2.0", "through2": "^2.0.0" }, "devDependencies": {