From f9a631f26e915fed11d8b734630cf1c135f3159f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Mon, 24 Oct 2016 17:38:16 +0100 Subject: [PATCH] fix postcss loader configuration --- frontend/package.json | 1 + frontend/webpack/base.js | 11 +++++------ frontend/yarn.lock | 2 +- ui/package.json | 2 ++ ui/webpack/base.js | 9 ++++----- ui/yarn.lock | 6 +++++- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 335a34d4..c7cae2ac 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -72,6 +72,7 @@ "nyc": "^8.3.1", "postcss-cssnext": "^2.8.0", "postcss-loader": "^1.0.0", + "postcss-modules-values": "^1.2.2", "pre-commit": "^1.1.3", "react-addons-test-utils": "^15.3.2", "style-loader": "^0.13.1", diff --git a/frontend/webpack/base.js b/frontend/webpack/base.js index 59ca778b..e7a6500b 100644 --- a/frontend/webpack/base.js +++ b/frontend/webpack/base.js @@ -13,14 +13,13 @@ const plugins = { 'loader-options-plugin': new webpack.LoaderOptionsPlugin({ options: { postcss: { - plugins: () => { - return [ - require('postcss-cssnext') - ]; - } + plugins: [ + require('postcss-modules-values'), + require('postcss-cssnext')() + ] } } - }), + }) 'define-plugin': new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify(process.env['NODE_ENV'] || 'development'), diff --git a/frontend/yarn.lock b/frontend/yarn.lock index ed17ea18..88e1a905 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -4654,7 +4654,7 @@ postcss-modules-scope@^1.0.0: css-selector-tokenizer "^0.6.0" postcss "^5.0.4" -postcss-modules-values@^1.1.0: +postcss-modules-values, postcss-modules-values@^1.1.0: version "1.2.2" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.2.2.tgz#f0e7d476fe1ed88c5e4c7f97533a3e772ad94ca1" dependencies: diff --git a/ui/package.json b/ui/package.json index ce745249..837a4195 100644 --- a/ui/package.json +++ b/ui/package.json @@ -12,6 +12,7 @@ "build-docs-static": "sh scripts/build-docs-static.sh" }, "dependencies": { + "classnames": "^2.2.5", "react": "^15.3.2" }, "devDependencies": { @@ -41,6 +42,7 @@ "nyc": "^8.3.1", "postcss-cssnext": "^2.8.0", "postcss-loader": "^1.0.0", + "postcss-modules-values": "^1.2.2", "pre-commit": "^1.1.3", "raw-loader": "^0.5.1", "react-addons-test-utils": "^15.3.2", diff --git a/ui/webpack/base.js b/ui/webpack/base.js index 9753c524..2d3299ff 100644 --- a/ui/webpack/base.js +++ b/ui/webpack/base.js @@ -11,11 +11,10 @@ const plugins = { 'loader-options-plugin': new webpack.LoaderOptionsPlugin({ options: { postcss: { - plugins: () => { - return [ - require('postcss-cssnext') - ]; - } + plugins: [ + require('postcss-modules-values'), + require('postcss-cssnext')() + ] }, 'embed-markdown-loader': { // don't detach yet (has a bug in the production config) diff --git a/ui/yarn.lock b/ui/yarn.lock index 53652e9e..4b83c123 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -1394,6 +1394,10 @@ clap@^1.0.9: dependencies: chalk "^1.1.3" +classnames@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" + clean-yaml-object@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68" @@ -4474,7 +4478,7 @@ postcss-modules-scope@^1.0.0: css-selector-tokenizer "^0.6.0" postcss "^5.0.4" -postcss-modules-values@^1.1.0: +postcss-modules-values@^1.1.0, postcss-modules-values@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.2.2.tgz#f0e7d476fe1ed88c5e4c7f97533a3e772ad94ca1" dependencies: