fix development setup
This commit is contained in:
@@ -4,6 +4,7 @@ import webpack from 'webpack'
|
|||||||
import httpProxyMiddleware from 'http-proxy-middleware'
|
import httpProxyMiddleware from 'http-proxy-middleware'
|
||||||
import webpackDevMiddleware from 'webpack-dev-middleware'
|
import webpackDevMiddleware from 'webpack-dev-middleware'
|
||||||
import webpackHotMiddleware from 'webpack-hot-middleware'
|
import webpackHotMiddleware from 'webpack-hot-middleware'
|
||||||
|
import historyApiFallbackMiddleware from 'connect-history-api-fallback'
|
||||||
import config from './webpack.config'
|
import config from './webpack.config'
|
||||||
import { sassImport } from './utilities'
|
import { sassImport } from './utilities'
|
||||||
import { srcPath, sassImportPath } from './paths'
|
import { srcPath, sassImportPath } from './paths'
|
||||||
@@ -11,6 +12,8 @@ import { srcPath, sassImportPath } from './paths'
|
|||||||
const bundler = webpack(config)
|
const bundler = webpack(config)
|
||||||
const middlewares = []
|
const middlewares = []
|
||||||
|
|
||||||
|
middlewares.push(historyApiFallbackMiddleware())
|
||||||
|
|
||||||
// add webpack stuff
|
// add webpack stuff
|
||||||
middlewares.push(webpackDevMiddleware(bundler, {
|
middlewares.push(webpackDevMiddleware(bundler, {
|
||||||
publicPath: config.output.publicPath,
|
publicPath: config.output.publicPath,
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
"babel-eslint": "^9.0.0",
|
"babel-eslint": "^9.0.0",
|
||||||
"babel-loader": "^8.0.2",
|
"babel-loader": "^8.0.2",
|
||||||
"browser-sync": "^2.24.7",
|
"browser-sync": "^2.24.7",
|
||||||
|
"connect-history-api-fallback": "^1.5.0",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
"css-loader": "^1.0.0",
|
"css-loader": "^1.0.0",
|
||||||
"eslint": "^5.5.0",
|
"eslint": "^5.5.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user