mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +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 /
|
// For serving static/ files to /
|
||||||
this.useMiddleware(
|
const staticMiddleware = serveStatic(
|
||||||
serveStatic(
|
|
||||||
resolve(this.options.srcDir, 'static'),
|
resolve(this.options.srcDir, 'static'),
|
||||||
this.options.render.static
|
this.options.render.static
|
||||||
)
|
)
|
||||||
)
|
staticMiddleware.prefix = this.options.render.static.prefix
|
||||||
|
this.useMiddleware(staticMiddleware)
|
||||||
|
|
||||||
// Serve .nuxt/dist/ files only for production
|
// Serve .nuxt/dist/ files only for production
|
||||||
// For dev they will be served with devMiddleware
|
// For dev they will be served with devMiddleware
|
||||||
|
Loading…
Reference in New Issue
Block a user