build: don't uglify

This commit is contained in:
Sérgio Ramos 2017-06-19 15:29:33 +01:00
parent 29b42fd4fc
commit 443752dc75
2 changed files with 6 additions and 1 deletions

View File

@ -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)) {

View File

@ -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"
},