Fix nested routes

This commit is contained in:
Barry Low committed 2018-10-17 00:57:38 -07:00
1 parent 1eacf1fbee
commit f7a9ef5711
4 files changed
+9 -12

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@
"main": "src/index.js",
"scripts": {
"dev": "NODE_ENV=development webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
"build": "cross-env NODE_ENV=production webpack --mode production --config ./webpack.config.js",
"build": "NODE_ENV=production webpack --mode production --config ./webpack.config.js",
"dev_win": "webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
"build_win": "webpack --mode production --config ./webpack.config.js",
"lint": "prettier-standard 'src/**/*.js'"
+1 -4
View File
@@ -1,5 +1,5 @@
import { ApolloProvider } from 'react-apollo'
import React, { Component } from 'react'
import React from 'react'
import { Route, BrowserRouter, Switch } from 'react-router-dom'
import { hot } from 'react-hot-loader'
@@ -39,17 +39,14 @@ export const MasterApp = () => (
}}
/>
<Route
exact
path='/teams'
render={props => <Teams {...props} auth={auth} />}
/>
<Route
exact
path='/keys'
render={props => <KeyVault {...props} />}
/>
<Route
exact
path='/users'
render={props => <Users {...props} auth={auth} />}
/>
+5 -6
View File
@@ -2,8 +2,6 @@ const webpack = require('webpack')
const Dotenv = require('dotenv-webpack')
const path = require('path')
const merge = require('webpack-merge')
const history = require('connect-history-api-fallback')
const convert = require('koa-connect')
const commonConfig = require('./helpers/webpack.common.config')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin')
@@ -15,12 +13,13 @@ module.exports = merge(commonConfig, {
output: {
path: path.resolve(__dirname, '../../build'),
filename: 'script.js'
filename: 'script.js',
publicPath: '/'
},
devServer: {
historyApiFallback: true,
},
historyApiFallback: true
},
plugins: [
new Dotenv({
@@ -44,5 +43,5 @@ module.exports = merge(commonConfig, {
}
]
},
target: 'web',
target: 'web'
})
+2 -1
View File
@@ -15,7 +15,8 @@ module.exports = merge(commonConfig, {
devtool: 'inline-sourcemap',
output: {
path: path.resolve(__dirname, '../../build'),
filename: 'script.js'
filename: 'script.js',
publicPath: '/'
},
optimization: {