Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { BrowserRouter as Router, Match, Miss }from 'react-router';
import AuthenticatedMatch from '../AuthenticatedMatch';
import styles from './App.scss';
import Header from './Header';
import Footer from './Footer';
import configureStore from '../../store/configureStore';
import RoleActions from '../../actions/roles';
@kwelch
kwelch / webpack.config.dev.js
Last active June 25, 2019 02:56
Webpack React-Toolbox & Non-CSS
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import autoprefixer from 'autoprefixer';
import path from 'path';
// all directories that have css that should use cssModules should be listed here
const cssModulesPath = [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules/react-toolbox'),
];
const runDynamicFieldProperties = (field, excludeProps = []) => (
Object.keys(field).reduce((acc, curr) => {
const currVal = field[curr];
const isFunc = (typeof currVal === 'function');
const isExcluded = excludeProps.some(key => key === curr);
const isMatch = isFunc && !isExcluded;
return Object.assign({}, acc, {
[curr]: isMatch ?
currVal({
data: acc,