mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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 %>,
|
||||
<%= (store ? 'store: context.store,' : '') %>
|
||||
route: (context.to ? context.to : context.route),
|
||||
error: context.error
|
||||
error: context.error,
|
||||
base: '<%= router.base %>',
|
||||
env: <%= JSON.stringify(env) %>
|
||||
}
|
||||
const next = context.next
|
||||
ctx.params = ctx.route.params || {}
|
||||
|
@ -174,6 +174,7 @@ function * generateRoutesAndFiles () {
|
||||
base: this.options.router.base,
|
||||
linkActiveClass: this.options.router.linkActiveClass
|
||||
},
|
||||
env: this.options.env,
|
||||
head: this.options.head,
|
||||
store: this.options.store,
|
||||
css: this.options.css,
|
||||
|
Loading…
Reference in New Issue
Block a user