mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 00:53:55 +00:00
a82f8d8b1f
* feat(generator): shared payload support for `nuxt export` * feat: add `export:` hooks for upward compatibility * fix: use setPayload to avoid breaking usage * test: update test * fix: deep assign * chore: update tests * fix: route payload has more periority than shared one * test: update generator hook tests * lint: remove unnecessary import
19 lines
294 B
JavaScript
19 lines
294 B
JavaScript
export default {
|
|
target: 'static',
|
|
export: {
|
|
payload: {
|
|
config: true
|
|
}
|
|
},
|
|
hooks: {
|
|
export: {
|
|
before ({ setPayload }) {
|
|
setPayload({ shared: true })
|
|
},
|
|
route ({ route, setPayload }) {
|
|
setPayload({ myRoute: route })
|
|
}
|
|
}
|
|
}
|
|
}
|