mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
feature: add static.prefix
This commit is contained in:
parent
b0eada0410
commit
a81af22d41
@ -249,12 +249,12 @@ module.exports = class Renderer {
|
||||
}
|
||||
|
||||
// For serving static/ files to /
|
||||
this.useMiddleware(
|
||||
serveStatic(
|
||||
const staticMiddleware = serveStatic(
|
||||
resolve(this.options.srcDir, 'static'),
|
||||
this.options.render.static
|
||||
)
|
||||
)
|
||||
staticMiddleware.prefix = this.options.render.static.prefix
|
||||
this.useMiddleware(staticMiddleware)
|
||||
|
||||
// Serve .nuxt/dist/ files only for production
|
||||
// For dev they will be served with devMiddleware
|
||||
|
Loading…
Reference in New Issue
Block a user