Commit Graph

41 Commits

Author SHA1 Message Date
Daniel Roe
71a3df8443
fix(vue-app): don't remove req/res/query unless in full static mode (#8611)
closes #7965
2021-01-11 11:11:00 +01:00
Pooya Parsa
7529d65d75 chore: migrate from @nuxt/ufo to ufo 2020-12-22 18:20:41 +01:00
Daniel Roe
9681a8937d
feat(config, vue-app, vue-renderer): support dynamic base and publicPath (#8520)
Co-authored-by: pooya parsa <pyapar@gmail.com>
2020-12-22 18:15:59 +01:00
Daniel Roe
92018e586b
feat(vue-app): support custom fetchKey for full static generation (#8466)
[release]
2020-12-17 12:49:59 +01:00
pooya parsa
fc51ca3330
fix: normalize routes and decode resolved query (#8430) 2020-12-06 18:32:39 +01:00
pooya parsa
cc1f6d94b5
fix: handle route encoding (#8325)
Co-authored-by: farnabaz <farnabaz@users.noreply.github.com>
2020-11-30 23:10:02 +01:00
Daniel Roe
7278b10112
fix(vue-app): warn if promises and functions are in fetch state (#8348) 2020-11-16 09:43:20 +01:00
Dmitriy
79440f3ce5
fix(vue-app): scrollRestoration hasn't set (#8055) 2020-09-30 10:57:36 +01:00
Sébastien Chopin
6ab65fbf4f
fix(vue-app): handle fallback on generated page (#7718)
* fix(vue-app): handle fallback on generated page

* chore: improvements and small refactor

* fix: lint

Co-authored-by: pooya parsa <pyapar@gmail.com>

* chore: add force-build option to nuxt generate

Co-authored-by: pooya parsa <pyapar@gmail.com>

[release]
2020-07-16 19:32:09 +02:00
Konstantin Barabanov
b4d3ebf472
fix(vue-app): sanitize path with trailing slash in getLocation (#6744) (#6745) 2020-06-30 19:16:21 +02:00
Xin Du (Clark)
7f1429ebb3
fix(vue-app): not strip trailing slash for redirect external domain (#7533) 2020-06-18 17:32:39 +02:00
Ryan Henning
838394815d
fix(vue-app): redirect no longer strips trailing slash from URL (#7475) 2020-06-16 20:37:47 +01:00
Sébastien Chopin
917adc0618
feat: options.target and full-static export (#6159)
* feat: add options.target

* fix(lint): lint

* fix(test): update snapshots

* fix(builder): default value for target

* fix(test): fix test

* fix(test): test fixing

* fix: use this.options.target

* fix: final test

* Update packages/vue-renderer/src/renderer.js

Co-Authored-By: Alexander Lichter <manniL@gmx.net>

* feat: Add target option and update banner

* fix(lint): fix

* feat: Add warning when using serverMiddleware in static target

* chore(utils): add TARGETS and MODES as constants

* hotfix: lint

* chore(module): add filename as alias of fileName

* feat: introducing nuxt export and router/routes.json

* hotfix: Fix the linting lord

* chore(core): add comment for filename vs fileName

* fix: use targets constant

* chore: remove warning

* fix: unit testing

* wip: refactor and use TARGETS

* fix: lint

* feat: add target as alias for first arg value

* fix: generate only for SPA

* chore: explain to use nuxt static X

* fix: render SPA fallback on redirect for static target

* fix: lint issue

* fix: only target is useful for now

* wip

* wip: nuxt static export is looking good

* Update packages/generator/src/generator.js

Co-Authored-By: Devon Rueckner <indirectlylit@users.noreply.github.com>

* Update packages/cli/src/options/common.js

Co-Authored-By: Alexander Lichter <manniL@gmx.net>

* feat: add options.target

* fix(lint): lint

* fix(test): update snapshots

* fix(builder): default value for target

* fix(test): fix test

* fix(test): test fixing

* fix: use this.options.target

* fix: final test

* Update packages/vue-renderer/src/renderer.js

Co-Authored-By: Alexander Lichter <manniL@gmx.net>

* feat: Add target option and update banner

* fix(lint): fix

* feat: Add warning when using serverMiddleware in static target

* chore(utils): add TARGETS and MODES as constants

* hotfix: lint

* chore(module): add filename as alias of fileName

* feat: introducing nuxt export and router/routes.json

* hotfix: Fix the linting lord

* chore(core): add comment for filename vs fileName

* fix: use targets constant

* chore: remove warning

* fix: unit testing

* wip: refactor and use TARGETS

* fix: lint

* feat: add target as alias for first arg value

* chore: explain to use nuxt static X

* fix: render SPA fallback on redirect for static target

* fix: lint issue

* fix: only target is useful for now

* wip

* wip: nuxt static export is looking good

* Update packages/generator/src/generator.js

Co-Authored-By: Devon Rueckner <indirectlylit@users.noreply.github.com>

* Update packages/cli/src/options/common.js

Co-Authored-By: Alexander Lichter <manniL@gmx.net>

* fix: duplicate imports

* chore: don't server render if an error happens on static target

* test: update unit and add export

* lint: fix

* lint: fix

* fix: e2e test

* fix: fallback only for static target

* fix: dev test

* feat: add generate.crawler

* fix: full static is when generate.static is given

* chore: improvements

* fix: Add isFullStatic in nuxt/config.json

* feat: handle fetch for full static

* feat: router.prefetchPayloads for full static

* chore: use fetch in async-data example

* fix: add target only if given

* fix: use created to have access to props in fetchOnServer

* chore: add console.error in dev for easy debugging

* feat: payload smart pre-fetching

* fix: remove alias for target

* fix: increment payloadFetchIndex is static set to false

* chore: lint

* chore: add serve command

* chore: rename universal to server-side

* fix: handle payloadPath on SPA fallback

* fix: lint

* chore lint again

* feat: handle spa fallback

* feat: support string for exclude

* fix: fallback only if no extension or html

* chore: use JSON.stringify() for static target

* chore: lint again, dammit

* chore: fix tests and remove too early return

* fix: early return only for server target

* fix: update tests

* fix: unit tests

* chore: add ssr option

* chore: add logic for ssr option

* fix: #6682

* chore(dx): add next command to run

* fix: lint

* fix: tests

* chore: keep old behaviour for nuxt build in spa

* fix: test again, oh boy

* fix: alright this is good now

* chore: add comment for spa fallback

* chore: move routes.json to dot nuxt dir

* chore: simplify check for promise

* chore: unique lock id

* chore: refactor isFullStatic

* fix: dont set default in build context

* chore: add test for serve

* chore: update tests

* hotfix: lint tests

* chore(dx): improve message for bundling

* feat: js payload extraction with jsonp

* fix: keep serialized session script for legacy generate

* fix: call to setPagePayload from fetchPayload

* use devalue for payload chunks

* feat: add initial load state chunk

* feat: preload payload and state scripts

* fix(vue-app): don't re-render the app if trailing slash on SSG

* hotfix: remove console.log

* chore(dx): add deploy infos for nuxt export

Co-authored-by: Pooya Parsa <pyapar@gmail.com>

* chore: handle fetching payload.js for nuxt state

* chore(dx): error when using nuxt generate and static

* chore: remove static option for clarity

* chore: remove serverless target

* hotfix: lint

* hotfix: unit tests

* chore: update legacy js resource

* chore: remove query params from url in static target

* fix: use globalName and urlJoin

* chore: typo

* feat: previewMode 👀

* chore: rename to enablePreview

* fix: wait next tick to avoid error on spa

* chore: try 1 sec

* hotfix: test only for linux, wtf azure

* refactor: static assets

- generalize logic for modules need emit export static assets
- allow customization for version, dir and base
- serialization logic is only in ssr now

* feat: smart state chunk creates

* fix(client): ignore payload load error

* perf: avoide payload loading for spa initial

* perf: avoid loading failed chunks again

* chore(cli): add simple compression for nuxt serve

* test: update snapshots

* fix version snapshot

* fix(generator): set staticAssetsBase on context only for full static

* fix tests

* fix: honor shouldHashCspScriptSrc

* chore(dx): add log for client-side fallback creation

Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
Co-authored-by: Alexander Lichter <manniL@gmx.net>
Co-authored-by: Pooya Parsa <pooya@pi0.ir>
Co-authored-by: Devon Rueckner <indirectlylit@users.noreply.github.com>
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
2020-05-07 21:08:01 +02:00
Pooya Parsa
0f27f80c0c
fix(vue-app): avoid multiple $fetch calls (#7129)
Co-authored-by: Aster <duda84@gmail.com>
2020-03-25 19:40:39 +01:00
Sébastien Chopin
b82f8d1640
fix: set default name to layout to avoid multi mounted (#7128) 2020-03-25 19:14:17 +01:00
Sébastien Chopin
6db325c321
feat(vue-app): new fetch syntax (#6880) 2020-02-04 19:36:22 +01:00
Pim
701f2d033b fix(vue-app): apply path-to-regexp options to tokensToFunction… (#6683) 2019-11-12 16:39:34 +00:00
Pim
ffc005c014 fix(vue-app): pass vm also as arg to support arrow fns (#6473) 2019-09-29 10:06:26 +02:00
Pim
8f0f16b076 chore: lint vue-app templates (#6390) 2019-09-10 11:51:14 +02:00
Pim
174c13d56c feat(vue-app): support configurable features (#6287) 2019-09-05 17:15:27 +02:00
Xin Du (Clark)
c6a9b37821 feat(vue-app): support functional watchQuery (#6222) 2019-08-19 00:05:16 +04:30
Alexander Lichter
d08ce2f628 refactor: small readability improvements (#5748) 2019-05-16 14:38:44 +04:30
pooya parsa
912ef25fce revert(vue-app): "expect 0 to be defined"
Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
2019-04-23 00:38:27 +04:30
Xin Du (Clark)
30c2b9542e
chore: revert vue-router temp fix (#5490) 2019-04-16 13:38:25 +01:00
Johan Roxendal
77dcfe6ee8 fix(vue-app): decode uri in getlocation (#5337) 2019-03-23 13:10:38 +04:30
Nianyong
cf02e8226a fix(vue-app): duplicated router.base when using context.redirect(object) (#5290) 2019-03-20 15:39:14 +03:30
Clark Du
5f9b1044ff Merge remote-tracking branch 'origin/2.x' into dev 2019-02-15 13:18:09 +00:00
Alexander Lichter
0826d7e5fd perf: await routeData promises in parallel (#5027) 2019-02-13 14:37:12 +00:00
Pooya Parsa
408680046c
fix(vue-app): fix asyncData memory leak on client-side (#4966)
Co-authored-by: Sébastien Chopin <seb@chopin.io>
2019-02-08 20:03:45 +03:30
Pooya Parsa
29297160a1
feat(vue-renderer): improvements (#4722) 2019-02-08 13:35:01 +03:30
Sébastien Chopin
f319033928
feat(nuxt-link): Smart prefetching and $nuxt.isOffline (#4574)
* feat(nuxt-link): Improve <n-link> and add automatic prefetch

* Update packages/vue-app/template/components/nuxt-link.js

Co-Authored-By: Atinux <seb@orion.sh>

* add missing space

* feat(nuxt-link): Split in two components for smaller bundle

* fix(vue-app): Use requestIdleCallback

* chore(vue-app): Improve nuxt prefetch strategy for nuxt links

* chore(vue-app): Add .isOnline and handle it for prefetch

* chore(vue-app): Add .isOffline and use it

* chore(vue-app): Add .isOffline

* chore(server): Check is options.modern is given in dev mode

* chore(vue-app): Add intersection-observer polyfill if router.prefetchLinks is 'polyfill'

* chore(vue-app): Remove polyfill

* chore(vue-app): Use only process.client

* chore(vue-app): Add TS typings for .isOnline and isOffline

* chore(vue-app): Update typings by @kevinmarrec

* chore(vue-app): Reorder names

* examples(nuxt-prefetch): Add Nuxt prefetching example

* chore(vue-app): Add router.linkPrefetchedClass

* lint(vue-app): Fix lint

* chore(vue-app): Use intersectionRatio, recommend by @maoberlehner

* fix(lint): Fix linting issues

* lint(vue-app): Fix again (lol)

* types(vue-app): Update TS typings

* chore(vue-app): Update Vetur tags description

* fix(vue-app): Use prefetchClass

* chore(vue-app): Disable linkPrefetchedClass by default
2018-12-28 17:27:03 +01:00
Sébastien Chopin
45be638479 fix(vue-app): Fix route meta to handle order 2018-12-09 13:07:06 +01:00
Clark Du
5a8e6e4bdf fix: merge route.meta into options.meta (#4479)
[skip release]
2018-12-04 15:49:05 +03:30
Clark Du
e2ab1b4896 fix(vue-app): router.meta is null on extendRoutes(#4478)
fixes #4154
2018-12-03 14:21:17 +03:30
Dmitry Molotkov
a6fed0acbd fix(vue-app): allow passing custom props to error function (#4462)
Resolves #4460.
2018-11-30 22:45:29 +03:30
Dmitry Molotkov
949785f58e fix(server, vue-app): allow unicode page names (#4402) 2018-11-25 18:22:37 +03:30
Clark Du
39b1b8e5e0
fix: router Expected "0" to be defined (#4394) 2018-11-24 00:02:13 +00:00
Dmitry Molotkov
9fbd581557 fix: handle errors that are not error instances (#4321) 2018-11-14 22:47:44 +03:30
Pooya Parsa
7c4e77ffb9
feat: dx improvements (#4259) 2018-11-08 12:45:56 +03:30
Alexander Lichter
10c608a649 chore(vue-app): deprecate callback-based asyncData, fetch and middleware (#4256) 2018-11-06 16:32:07 +03:30
Pooya Parsa
39b558f59c
refactor core into sub-packages (#4202) 2018-10-31 00:12:53 +03:30