From 443752dc752645307c7cd602f7251fd5e660862f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Mon, 19 Jun 2017 15:29:33 +0100 Subject: [PATCH] build: don't uglify --- packages/cp-frontend/scripts/patch-webpack-config.js | 5 +++++ packages/ui-toolkit/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cp-frontend/scripts/patch-webpack-config.js b/packages/cp-frontend/scripts/patch-webpack-config.js index cc38fa95..176732f1 100644 --- a/packages/cp-frontend/scripts/patch-webpack-config.js +++ b/packages/cp-frontend/scripts/patch-webpack-config.js @@ -1,3 +1,4 @@ +const webpack = require('webpack'); const isString = require('lodash.isstring'); const fs = require('fs'); const path = require('path'); @@ -8,6 +9,10 @@ const FRONTEND = path.join(FRONTEND_ROOT, 'src'); module.exports = config => { config.resolve.plugins = []; + config.plugins = config.plugins.filter( + plugin => !(plugin instanceof webpack.optimize.UglifyJsPlugin) + ); + config.module.rules = config.module.rules .reduce((loaders, loader, index) => { if (Array.isArray(loader.use)) { diff --git a/packages/ui-toolkit/package.json b/packages/ui-toolkit/package.json index 45a1c788..badfcd8c 100644 --- a/packages/ui-toolkit/package.json +++ b/packages/ui-toolkit/package.json @@ -23,7 +23,7 @@ "compile-watch:umd": "cross-env NODE_ENV=test babel src --out-dir dist/umd --source-maps inline --watch", "compile": "redrun -p compile:*", "watch": "redrun copy-fonts && redrun -p compile-watch:*", - "styleguide:build": "cross-env NODE_ENV=development styleguidist build", + "styleguide:build": "cross-env NODE_ENV=production styleguidist build", "styleguide": "cross-env NODE_ENV=development styleguidist server", "postinstall": "redrun -s copy-fonts compile" },