Nuxt/test/fixtures/full-static/nuxt.config.js
Pooya Parsa a82f8d8b1f
feat(generator): export:route hook and setPayload (#7422)
* 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
2020-05-27 16:51:51 +02:00

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 })
}
}
}
}