mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
Add env in context
This commit is contained in:
parent
a30ce76b0c
commit
87789b8748
@ -31,7 +31,9 @@ export function getContext (context) {
|
|||||||
isDev: <%= isDev %>,
|
isDev: <%= isDev %>,
|
||||||
<%= (store ? 'store: context.store,' : '') %>
|
<%= (store ? 'store: context.store,' : '') %>
|
||||||
route: (context.to ? context.to : context.route),
|
route: (context.to ? context.to : context.route),
|
||||||
error: context.error
|
error: context.error,
|
||||||
|
base: '<%= router.base %>',
|
||||||
|
env: <%= JSON.stringify(env) %>
|
||||||
}
|
}
|
||||||
const next = context.next
|
const next = context.next
|
||||||
ctx.params = ctx.route.params || {}
|
ctx.params = ctx.route.params || {}
|
||||||
|
@ -174,6 +174,7 @@ function * generateRoutesAndFiles () {
|
|||||||
base: this.options.router.base,
|
base: this.options.router.base,
|
||||||
linkActiveClass: this.options.router.linkActiveClass
|
linkActiveClass: this.options.router.linkActiveClass
|
||||||
},
|
},
|
||||||
|
env: this.options.env,
|
||||||
head: this.options.head,
|
head: this.options.head,
|
||||||
store: this.options.store,
|
store: this.options.store,
|
||||||
css: this.options.css,
|
css: this.options.css,
|
||||||
|
Loading…
Reference in New Issue
Block a user