From 13ddd57a09dc5d204592891827b16ad52c10835a Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Wed, 8 Feb 2017 14:20:00 +0000 Subject: [PATCH] Prevent caching CSS when in development mode Fixes issue #33 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index cef6fa8..b376f82 100644 --- a/src/index.js +++ b/src/index.js @@ -92,7 +92,7 @@ export default function transformCssModules({ types: t }) { if (typeof processed !== 'string') processed = css; - if (!state.$$css.styles.has(filepath)) { + if (currentConfig.devMode || !state.$$css.styles.has(filepath)) { state.$$css.styles.set(filepath, processed); extractCssFile(process.cwd(), filepath, processed, state); }