I noticed that NuxtserverInit and Middleware are being called on every *.css.map request.
Probably, to reprouduce one needs to set extractCSS: true,
NuxtserverInit should only be called on pages
*.css.map requests should not hit middleware
This is causing a serious performance hit
Does it happen on production builds or only when run as dev?
Actually, it is a known issue. We are working on serve-placeholder to resolve this exact issue. Thanks for the report. Will open PR soon. Expect it for 2.2.0 :)
2.2.0 is out and I still have this issue in. For all *.map files. Any updates on this?
@swunderlich It's still in progress.
Any updates here?
I'm stuck with this issue.

Are you sure the map file exists? I found in Chrome it will have a guess as to where the map files are. If the map file is not found, it will generate a 404 instead which the Nuxt server will serve as a normal page, going though the whole NuxtServerInit/middleware for the 404 page. If a 404 is encountered, then the request will not be shown in the Chrome dev tools, only successful .map requests are shown there. Once I have understood this, it all feels like completely normal behaviour.
To test this, log out the context.route.path of the phantom requests. When the dev tools is open, I get an extra request for path: '/_nuxt/rocketship_vue.common.js.map'
Related to #1863. Working on a fix to prevent SSR renders for 404 hits inside _nuxt. Actually, serve-placeholder implemented a long time ago, it should be only integrated.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Actually, it is a known issue. We are working on serve-placeholder to resolve this exact issue. Thanks for the report. Will open PR soon. Expect it for
2.2.0:)