Static GitHub Issues

[2270] How does the 'generate' work with middleware ?

prev: router.base not maintained in build (without config file)
next: Nuxt scoped slot not working

I found a problem what is, I want to use a middleware which called 'userAgent'

in nuxt.config.js,like this: router: { middleware: 'userAgent', }, as the document said.

but, when I run 'npm run generate' code, it warning

{ Error: ENOENT: no such file or directory, lstat '/Users/summerd/Documents/ workspace/cy/ssr-template/dist/index.html' errno: -2, code: 'ENOENT', syscall: 'lstat', path: '/Users/summerd/Documents/workspace/cy/ssr-template/dist/index.html' }

and the dist fold I can't find index.html and 200.html. Does any body know something about this, and know how can I build successfully with router: { middleware: 'xxxx' } ?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1988">#c1988</a>)</em></sub></div>