From 18f6204bdffd0426baf05ba0bafc2a3014127f68 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 25 Jan 2021 20:34:22 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Include=20CSS=20in=20the=20build=20?= =?UTF-8?q?(probably)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nwb.config.js | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/nwb.config.js b/nwb.config.js index d299cd4..e87e50d 100644 --- a/nwb.config.js +++ b/nwb.config.js @@ -14,5 +14,17 @@ module.exports = { "@babel/preset-react", "@babel/preset-env" ] + }, + webpack: { + rules: { + css: { + modules: true, + localIdentName: ( + process.env.NODE_ENV === 'production' + ? '[path][name]-[local]-[hash:base64:5]' + : '[hash:base64:5]' + ) + } + } } } diff --git a/package.json b/package.json index 0109aee..a3668ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bluelib", - "version": "0.23.0", + "version": "0.23.1", "description": "React components for Bluelib", "main": "lib/index.js", "module": "es/index.js",