DEV: Reorder custom ember-cli middleware to restore error page (#24383)

Ember-cli has built-in error pages when there is a build error. Previously these were not being used in Discourse because our custom proxy middleware was too early in the stack. This commit reorders things  so that the "broccoli-watcher" middleware runs before our custom proxy. It also disables the `historySupportMiddleware`, which doesn't make sense in our 'always proxy' setup.
This commit is contained in:
David Taylor 2023-11-15 14:43:01 +00:00 committed by GitHub
parent 02cb262b2e
commit 3e45837d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -9,9 +9,11 @@
],
"ember-addon": {
"before": [
"serve-files-middleware",
"history-support-middleware",
"broccoli-serve-files",
"proxy-server-middleware"
],
"after": [
"broccoli-watcher"
]
},
"devDependencies": {

View File

@ -70,6 +70,8 @@ module.exports = function (defaults) {
backburner:
"node_modules/@discourse/backburner.js/dist/named-amd/backburner.js",
},
historySupportMiddleware: false,
});
// TODO: remove me