aboutsummaryrefslogtreecommitdiff
path: root/vnext/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/webpack.config.js')
-rw-r--r--vnext/webpack.config.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js
index 891a3e53..9eb1d7fa 100644
--- a/vnext/webpack.config.js
+++ b/vnext/webpack.config.js
@@ -1,3 +1,6 @@
+const history = require('connect-history-api-fallback');
+const convert = require('koa-connect');
+
module.exports = {
entry: {
"vendor": ['react', 'react-dom', 'react-markdown', 'whatwg-fetch'],
@@ -17,3 +20,14 @@ module.exports = {
]
}
};
+
+module.exports.serve = {
+ content: [__dirname],
+ add: (app, middleware, options) => {
+ const historyOptions = {
+ // ... see: https://github.com/bripkens/connect-history-api-fallback#options
+ };
+
+ app.use(convert(history(historyOptions)));
+ }
+};