https://github.com/chanlito/nuxt-middleware-bug
So middleware doesn't seem to work when my layout is written like below:
<template>
<div>
<div>Layout</div>
<nuxt/>
</div>
</template>
<script>
import Vue from 'vue';
export default Vue.extend({ // <-- this doesn't
middleware: 'ok',
});
</script>
But this works.
<template>
<div>
<div>Alt Layout</div>
<nuxt/>
</div>
</template>
<script>
export default {
middleware: 'ok',
};
</script>
Middleware should work fine with layout created with Vue.extend
Not working.
On pages middleware seems to work fine with or without Vue.extend
Hey @chanlito
Thank you very much for this bug report and reproduction link.
This issue should be resolved with https://github.com/nuxt/nuxt.js/commit/521ac20e298b6a7f090cdedce63098f2c234417f and should be available in next version of nuxt-edge tonight :)
Seems to be working now.
Most helpful comment
Hey @chanlito
Thank you very much for this bug report and reproduction link.
This issue should be resolved with https://github.com/nuxt/nuxt.js/commit/521ac20e298b6a7f090cdedce63098f2c234417f and should be available in next version of
nuxt-edgetonight :)