From 62947c2332aded258af0e03661ec07cd6027408f Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 23 Aug 2020 15:25:58 +0200 Subject: [PATCH] Make CSS transform global by default --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f72c24b..bcaca91 100644 --- a/index.js +++ b/index.js @@ -59,7 +59,9 @@ module.exports = function (browserify, options) { dedupePhase.push(createDedupeBundleCssStream(options)); } - browserify.transform(createTransform, options); + // NOTE: This is global because otherwise the transform will not run when processing node_modules. If this causes problems for you, please file an issue! + // FIXME: Figure out if there's a better solution for this + browserify.transform(createTransform, { ... options, global: true }); browserify.on("reset", () => { setupPipeline();