From 10bce5a425e80397dc36c1185b9c9da1af39b162 Mon Sep 17 00:00:00 2001 From: Max Stoiber Date: Thu, 11 Aug 2016 23:04:29 +0200 Subject: [PATCH] Disable dot rule of connect-history-api-fallback (#422) Ref #387 --- package.json | 2 +- scripts/start.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1054a76bf77..f56d704ccd9 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-runtime": "6.11.6", "case-sensitive-paths-webpack-plugin": "1.1.3", "chalk": "1.1.3", - "connect-history-api-fallback": "1.2.0", + "connect-history-api-fallback": "1.3.0", "cross-spawn": "4.0.0", "css-loader": "0.23.1", "detect-port": "1.0.0", diff --git a/scripts/start.js b/scripts/start.js index 1cb33481294..3655774ec1c 100644 --- a/scripts/start.js +++ b/scripts/start.js @@ -173,6 +173,8 @@ function addMiddleware(devServer) { // Every unrecognized request will be forwarded to it. var proxy = require(paths.appPackageJson).proxy; devServer.use(historyApiFallback({ + // Allow paths with dots in them to be loaded, reference issue #387 + disableDotRule: true, // For single page apps, we generally want to fallback to /index.html. // However we also want to respect `proxy` for API calls. // So if `proxy` is specified, we need to decide which fallback to use.