Commit Graph

234 Commits

Author SHA1 Message Date
Yaroslav Vorobev
66b4aa2f62
fix(vue-app): nuxt-link prefetch error on fallback page (#7766) 2020-07-27 15:44:10 +02: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
pooya parsa
c5a4465572
feat: static target DX improvements (#7712)
[release]

Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
Co-authored-by: pimlie <pimlie@hotmail.com>
2020-07-16 17:10:54 +02:00
Sébastien Chopin
f81c588bf6
fix(vue-app): don't fetch payload for store mutation for preview and spa fallback (#7723) 2020-07-16 17:10:06 +02:00
Denis Karabaza
d4363d4477
fix(vue-app): check plugin key on Vue.prototype instead of Vue (#7656) 2020-07-02 18:43:32 +02:00
Sébastien Chopin
191f66a19b
fix(vue-app): handle layout on client error (#7654)
[release]
2020-07-02 18:22:12 +02:00
Sébastien Chopin
2f07f66fb8
fix(vue-app): don't fetch payload on first spa fallback render (#7657) 2020-07-02 18:19:32 +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
pooya parsa
a52385361b
fix(vue-app): remove hash from payload path (#7614)
* fix(vue-app): remove hash from payload path

* test: add hash usage to full-static fixture
2020-06-26 17:10:24 +02:00
Sébastien Chopin
fe01ec34d3
fix(vue-app): no need to set layout on App (#7606) 2020-06-25 15:23:06 +02:00
Sébastien Chopin
6332aaa3a2 fix: check correct layout when navigating from error
Resolves #7567
2020-06-23 19:54:47 +02:00
pooya parsa
11a87d858d
fix(vue-app): always import resolveRouteComponents (#7591)
[release]
2020-06-23 17:48:09 +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
pooya parsa
92ef65c8ed
fix(generator): encode routes and show error summary (#7518) 2020-06-16 17:53:29 +02:00
Pooya Parsa
2faa30259f chore(deps): update @nuxt/loading-screen to 2.0.0-rc.4 2020-06-16 15:48:10 +02:00
Sébastien Chopin
44f471f141 hotfx(vue-app): app is not defined
[release]
2020-06-12 19:41:41 +02:00
Sébastien Chopin
7c6e170a89
fix: handle router.base for crawler and serve (#7486)
Co-authored-by: pooya parsa <pyapar@gmail.com>
2020-06-10 09:51:29 +02:00
Jonas Galvez
0acfc78932
fix(vue-app): prevent double layout execution (#5703) (#7442) 2020-06-09 18:39:51 +02:00
Pooya Parsa
35f3ad7de3
fix: use different port for loading-screen sse (#7286)
* chore: read sse base from _loadingScreenBaseURL

* bump: @nuxt/loading-screen to 2.0.0-rc.1
2020-06-01 17:30:26 +02:00
Pooya Parsa
1e53e38f8d
refactor: inline staticAssetsBase in state chunk for full-static (#7401)
* refactor(vue-app): use NUXT.serverRendered instead of NUXT.spa

* refactor: inline staticAssetsBase into state.js chunk

* revert: unwanted change

[release]
2020-05-20 19:31:31 +02:00
Pooya Parsa
0337932115
feat: runtime config and built-in dotenv support (#7312)
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2020-05-18 10:21:15 +02:00
Sibbngheid
0c81c52c41
fix: set build indicator icon height for ie11 (#7378) 2020-05-17 21:42:00 +02:00
Sébastien Chopin
f4f6b1912b fix(vue-app): catch error on full static for store mutations
[release]
2020-05-17 00:04:17 +02:00
Sibbngheid
7cf4edba60
fix: set build indicator icon height for ie11 (#7377) 2020-05-16 19:56:08 +02:00
Pooya Parsa
42406d6075
feat: store and replay vuex mutations for static target (#7350)
* feat: store and replay vuex mutations for static target

* test: add full-static fixture

* perf: clean store subscription before render

* fix: record mutations after nuxtServerInit and middleware
2020-05-12 13:05:24 +02:00
Sébastien Chopin
8e2d9764e2
fix(generator): remove trailingSlash for chunkId (#7336)
[release]
2020-05-08 18:10:06 +02: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
Jimmy
a0db3644f6
fix(vue-app): allow background customization for default loading template (#7162) 2020-05-07 13:09:39 +02:00
Kevin Marrec
e089ac649f
fix(vue-app): sanitizeComponent import regression with features disabled (#7271) 2020-04-24 18:05:55 +02:00
Sébastien Chopin
479e3ffefb
feat(vue-app): inject into plugins context (#7212) 2020-04-14 11:27:13 +02:00
Nicolas PENNEC
a2495a6873
chore: fix typos (#7219) 2020-04-14 11:26:40 +02:00
Pooya Parsa
06073697f4
fix(vue-app): sanitize layouts after resolve for splitChunks.layout (#7139) 2020-03-27 14:08:48 +01: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
Pooya Parsa
c8e7397d07
fix(vue-app): use globals.nuxt for fetch client mixin (#7103) 2020-03-18 11:30:50 +01:00
Jason Poindexter
1f5d489850
fix(vue-app): middleware not executing on double browser back navigation (#6775)
fixes #6716.
2020-03-13 22:26:35 +01:00
Xin Du (Clark)
a7052b637b
feat(vue-app): trigger watchParam when param is changed in same route (#6244) 2020-03-13 21:28:42 +01:00
pooya parsa
f1e2362456 chore: remove new fetch warning 2020-03-12 15:40:03 +01:00
Jonas Galvez
a3fdba885e
chore(vue-app): improve missing inject value error message (#7032) 2020-02-29 20:16:43 +01:00
Sébastien Chopin
b71eaee879 chore: use data-fetch-key instead of data-ssr-key 2020-02-12 16:41:23 +01:00
Matteo Rigon
539c865533
fix(vue-app): use child transition name when navigating to parent (#6946) 2020-02-11 15:06:37 +01:00
Sébastien Chopin
6db325c321
feat(vue-app): new fetch syntax (#6880) 2020-02-04 19:36:22 +01:00
wppd
e271aa0a0a
chore(vue-app): pass error as param to nuxt-loading fail method (#6939) 2020-02-03 16:41:37 +01:00
Vladlen
e91a441f2c fix(vue-app): add fallback context for error (#6854)
Co-Authored-By: Sébastien Chopin <seb@nuxtjs.com>
2020-01-16 18:09:16 +01:00
Sébastien Chopin
c9beac3c7b fix(vue-app): resolve leave transition on child routes (#6803) 2020-01-10 21:45:13 +01:00
Sébastien Chopin
0cb2df73a0 fix(vue-app): move head to index to avoid global state (#6807) 2019-12-18 15:27:30 +01:00
Xin Du (Clark)
e8aca9eb11 chore: update @nuxtjs/eslint-config to v2 and fix lint errors (#6732) 2019-11-26 23:42:39 +01:00
Xin Du (Clark)
d83761028e feat(vue-app): upgrade vue-router to 3.1.x (#6722) 2019-11-26 23:41:19 +01:00
Rafał Chłodnicki
e9945b0896 fix(vue-app): pass router mode to getLocation (#6658) 2019-11-24 14:26:33 +01:00
Mohammad M. Shahbazi
6cc962fa16 fix: context.route issue in plugins and splitChunks.pages === false (#6685) 2019-11-19 09:27:54 +00:00
Pim
701f2d033b fix(vue-app): apply path-to-regexp options to tokensToFunction… (#6683) 2019-11-12 16:39:34 +00:00
Xin Du (Clark)
afb38fe492
fix(vue-app): layout in error.vue not work for Vue.extend component (#6650) 2019-11-05 17:53:39 +00:00
Sébastien Chopin
9f921fe136 fix(vue-app): add prefetched class to <nuxt-link> after chunk loaded (#6623) 2019-10-28 15:32:24 +01:00
Pim
b031fac121 fix: collapsed ssr log (#6590) 2019-10-18 10:36:49 +01:00
Xin Du (Clark)
0834903152 fix(vue-app, webpack): remove consola from client (#6504) 2019-10-08 11:06:29 +02:00
Xin Du (Clark)
578d5d41f4 fix(vue-app): error page layout not correctly applied in client rendering (#6479) 2019-09-30 10:44:35 +02:00
Pim
ffc005c014 fix(vue-app): pass vm also as arg to support arrow fns (#6473) 2019-09-29 10:06:26 +02:00
Louis-Marie Michelin
7b3155347c feat(vue-app): add prefetch prop to <nuxt-link> (#6292) 2019-09-18 17:06:46 +02:00
Pim
b17f331fe5 feat: support setting (non-essential) vue-meta options by user (#6432) 2019-09-18 15:51:44 +02:00
Pim
ec6ef6e425 fix(vue-app): fix asyncData hydration when features.transition: false (#6433) 2019-09-18 15:51:22 +02:00
Pim
3b9eddc223 fix(vue-app): clear idle callback (#6430) 2019-09-18 10:54:17 +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
Pim
e78e8b4b7d feat(builder): support adding custom middlewares (#6342) 2019-09-02 12:53:52 +02:00
Pim
93a0924754 fix(vue-app): prevent looping on error during render of error page (#6217) 2019-09-01 16:58:56 +02:00
Xin Du (Clark)
e9c4bcfee2
feat(vue-app): function watchQuery (#6297) 2019-08-31 19:23:11 +01:00
Xin Du (Clark)
d85d2fb612
Revert "feat: function watchQuery (#6245)" (#6296)
This reverts commit 3c61830a0d.
2019-08-25 10:53:23 +01:00
Xin Du (Clark)
3c61830a0d
feat: function watchQuery (#6245) 2019-08-25 10:12:59 +01:00
Pim
662a409056 fix(vue-app): only overwrite leave listener when none provided or without done arg (#6264) 2019-08-21 16:06:52 +04:30
Sébastien Chopin
fda1b1b54b fix(vue-app): enforce default css when used with frameworks (#6255) 2019-08-20 20:45:36 +04:30
Xin Du (Clark)
c6a9b37821 feat(vue-app): support functional watchQuery (#6222) 2019-08-19 00:05:16 +04:30
Ricardo Gobbo de Souza
2ad6bf2a08 feat(vue-app): export router options (#6231) 2019-08-15 00:08:25 +04:30
Sébastien Chopin
09878cd6dc
feat(vue-app): add $nuxt.refresh() (#6194)
* feat(vue-app): add $nuxt.refreshPageData()

* hotifx: lint

* chore: use getMatchedComponentsInstance util

* fix: rename to refreshPage

* fix: rename to refresh

* feat: add $nuxt.$context and handle error

* feat: set $nuxt.context

* hotfix: test
2019-08-07 15:12:02 +02:00
Sébastien Chopin
9cc3e34673 feat(vue-app): use EventSource instead of WebSocket for build indicator (#6186) 2019-08-05 20:15:33 +04:30
Sébastien Chopin
f7cb3dae0f feat(vue-app): support app/router.scrollBehavior.js and deprecate scrollBehavior (#6055) 2019-07-24 16:05:50 +04:30
Farzad Soltani
9909bdb534 chore: fix typo (#6065) 2019-07-13 23:27:07 +04:30
bluelovers
9524bcae5e feat(vue-app): add <client-only> alias for <no-ssr> (#5941) 2019-07-04 16:47:45 +01:00
Pim
ac723e6ca6 fix(vue-app): emit triggerScroll to support hash navigation (#6012) 2019-07-03 13:34:51 +04:30
Sébastien Chopin
329f0f5f36 fix(vue-app): fix font-size and make width bigger (#5920) 2019-06-14 22:05:21 +04:30
Pim
2a2bf9b93d fix(vue-app): always finish transition.leave asynchronously (#5891) 2019-06-14 21:58:03 +04:30
Rafał Chłodnicki
0e2965319d fix(vue-app): fix position of the build indicator when page scrolled (#5890) 2019-06-07 01:54:33 +04:30
Pooya Parsa
cb1b980d8a
feat(vue-app): allow customizing loading indicator (#5844) 2019-06-06 12:39:28 +04:30
Rafał Chłodnicki
ab72355669 fix(vue-app): fix exception on property access of undefined object (#5867) 2019-06-05 00:18:56 +04:30
Pooya Parsa
0c3b9c5d12
fix(vue-app): reduce consola direct access (#5864) 2019-06-04 19:18:45 +04:30
Alexander Lichter
2e41bb47b5 refactor(vue-app): simplify mount error log (#5826)
* separately log mount error in dev mode
* simplify mount exception

Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
2019-05-30 14:28:37 +01:00
Sébastien Chopin
0d5b49dcbc fix(vue-app): update build indicator style (#5834) 2019-05-30 15:57:41 +04:30
Pooya Parsa
f39fe2279e
refactor: improve build indicator (#5832)
[release]
2019-05-30 14:33:57 +04:30
Elevista
3142ce15d8 fix(vue-app): fixPrepatch in-out transition fix (#5797) (#5824) 2019-05-30 09:04:37 +02:00
Pooya Parsa
a759196865 feat(vue-app): build indicator (#5820)
* feat: inline HMR progress indicator

* support router base

* fix nuxt err

* fix space

* fix indentation

* return in case of ws message parsing error

* close ws on beforeDestroy

* ui: Update loading indicator UI

* builder: Add build.indicator option

* ui: Use only logo and %

* hotfix: Alphabetical order

* hotfix: Add fixed with and add back v-if

* minor style change

* rename component to build-indicator

* feat: animated progress

* assign name to component

* update test

* naming consistency

* render into app to prevent dom wrapping

* extra new line

* better App.js formatting

* update snapshot

* clear interval
2019-05-29 16:44:15 +02:00
Pooya Parsa
09620d58a9 feat: improve browser logs (#5810) 2019-05-27 09:32:53 +01:00
Xin Du (Clark)
21aaef3b48 feat(vue-renderer): support render.ssrLog for controlling SSR logs (#5784) 2019-05-23 14:19:16 +04:30
Xin Du (Clark)
a764e1f90d refactor(vue-app): add group for ssr logs (#5770) 2019-05-21 11:19:16 +02:00
Jun
7084b3a126 fix(vue-app): reuse page component with watchQuery (#5757) 2019-05-19 23:27:20 +04:30
Xin Du (Clark)
30419e73f2
fix(vue-app): remove trailing slash in vue-router non-strict mode (#5746) 2019-05-17 10:39:52 +01:00
Rafał Chłodnicki
5d5a32b556 fix(vue-app): don't attach catch handler to already loaded component (fixes #5751) (#5752) 2019-05-17 00:01:12 +04:30
Alexander Lichter
d08ce2f628 refactor: small readability improvements (#5748) 2019-05-16 14:38:44 +04:30
Rafał Chłodnicki
8588ca9a7e fix(vue-app): Followup for fix for handle prefetch error (#5687) (#5690) 2019-05-10 10:56:28 +01:00
Rafał Chłodnicki
be18b31525 fix(vue-app): properly catch component loading error (#5687) (#5688) 2019-05-10 13:20:50 +04:30
Hyunje Jun
2a66d1952e fix(vue-app): consider watchQuery option in routerViewKey (#5516) 2019-05-09 16:23:59 +04:30