Have Koa function alongside Nuxt, when Nuxt has a different context-root than / (e.g. have /foo/, instead of /, as in http://example.org/foo/).
Nuxt supports to tell which context-root (e.g. instead of / ⇉ /foo/) to use when running with nuxt.config.js's router.base option. (see nuxt.js/.../configuration-router)
What problem does this feature solve?
Have Koa function alongside Nuxt, when Nuxt has a different context-root than
/
(e.g. have/foo/
, instead of/
, as inhttp://example.org/foo/
).Nuxt supports to tell which context-root (e.g. instead of
/
⇉/foo/
) to use when running withnuxt.config.js
'srouter.base
option. (see nuxt.js/.../configuration-router)But when using Koa alongside Nuxt, Koa throws exceptions.
This might just be a matter of having the right combination of settings, initialized in the right order. But which settings, and where is the question
P.S. This is an issue created by the request of @clarkdo, following up nuxt/koa-template - Document how to also make Koa match Nuxt's router.base #c29
What does the proposed changes look like?
/
as usualP.S.: I've started working towards this while refactoring clarkdo/hare (see renoirb/experiments-nuxt-koa-env-runtime-201806, branch rework-hare-20180619 as a starting point)