Skip to content

Commit

Permalink
#152991073 Users can't add book (#72)
Browse files Browse the repository at this point in the history
* chore(implement-lf-feedback): implement LF feedback during code defence with Temi Lajumoke

* bug(make-test-pass): make test pass on travis

* feature(social-auth): add facebook and google social login

* bug(bug-fix): change the order of users migration files

* feat(reset-password): reset password on client side

* chore(server-test): refactor server test to separate folders

* chore(client-validation): add client side validation to sigin, signup and add category forms

* bug(bug-fix): fix bug that doesn't allow users add a book in production
  • Loading branch information
adesege committed Nov 18, 2017
1 parent 0b9abd8 commit bb1425b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
6 changes: 1 addition & 5 deletions client/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ module.exports = {
{
test: /\.(js|jsx)?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
exclude: /node_modules/
},
{
test: /\.scss$/,
Expand Down Expand Up @@ -104,7 +101,6 @@ module.exports = {
stats: {
colors: true
},
devtool: 'source-map',
node: {
fs: 'empty'
}
Expand Down
22 changes: 7 additions & 15 deletions client/config/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const MinifyPlugin = require('babel-minify-webpack-plugin');
const babelMinify = require('babel-preset-minify');
const babelCore = require('babel-core');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const common = require('./webpack.common');

Expand All @@ -26,7 +23,12 @@ module.exports = merge(common, {
test: /\.(css|scss)$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
use: {
loader: 'css-loader',
options: {
minimize: true
}
}
})
},

Expand All @@ -48,17 +50,7 @@ module.exports = merge(common, {
]
},
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
extractSass,
new MinifyPlugin({
removeConsole: true,
removeDebugger: true
}, {
comments: false,
babel: babelCore,
minifyPreset: babelMinify,
booleans: true,
keepFnName: true
})
new webpack.optimize.UglifyJsPlugin()
],
});
2 changes: 1 addition & 1 deletion client/src/actions/types.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import keyMirror from 'keymirror-js';
import keyMirror from 'utils/keyMirror';

const actions = [
'ADD_FLASH_MESSAGE',
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Books/BooksModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import validateBook from 'utils/validators/book';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Document, Page } from 'react-pdf';
import { Document, Page } from 'react-pdf/build/entry.webpack';
import UploadBookCover from './UploadBookCover';

/**
Expand Down
4 changes: 4 additions & 0 deletions client/src/utils/keyMirror.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default (array) => array.reduce((object, string) => {
object[string] = string;
return object;
}, {});

0 comments on commit bb1425b

Please sign in to comment.