Commit Graph

52 Commits

Author SHA1 Message Date
Daniel Roe
69b5264ef3
fix: allow relative public paths (#8935) 2021-03-10 12:48:41 +01:00
Hannes Küttner
07e97f168a
fix(vue-renderer): respect injectScripts for target:static (#8912) 2021-03-01 20:29:51 +00:00
Daniel Roe
c8a4b91ad4
fix: ignore trailing slash in static payloads manifest (#8794) 2021-02-09 16:58:49 +01:00
Pooya Parsa
7529d65d75 chore: migrate from @nuxt/ufo to ufo 2020-12-22 18:20:41 +01:00
pooya parsa
dec8f99fc3
feat: support plug-and-play, typescript runtime and native modules (#8389)
Co-authored-by: Clark Du <clark.duxin@gmail.com>
2020-12-22 18:07:50 +01:00
Daniel Roe
fb191d2fbd
fix(vue-app, vue-renderer, utils): respect trailingSlash setting for payloads (#8489)
* fix(utils): don't inject a trailing slash on catchall routes (e.g. `/*/`)

closes #8488

* fix(vue-app, vue-renderer): respect `trailingSlash` setting for payloads

* refactor: use new ufo `parsePath` utility

Co-authored-by: pooya parsa <pyapar@gmail.com>
2020-12-17 12:51:14 +01:00
Daniel Roe
8d9d6a94d2
feat(vue-renderer): allow adding async attribute to <script> tags (#8347) 2020-12-01 12:10:44 +01:00
Sébastien Chopin
691f21c683
fix(vue-app): handle missing payloads on full static (#8314)
* fix(vue-app): handle missing payloads on full static

Fixes #7717

* chore: rename routesManifest to manifest

* chore: remove console.log

* chore(vue-app): don't have staticAssetsBase if undefined

* chore: add manifest option

* test: update snapshot

* chore: use foundRoute to avoid multiple vars name

Co-authored-by: Pooya Parsa <pyapar@gmail.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2020-11-25 15:19:29 +01:00
Daniel Roe
b050861332
fix(generator): respect publicPath for static assets (#8344)
* fix: respect publicPath for static assets

* test: add test for correct `publicPath` URL handling
2020-11-14 23:10:16 +01:00
Per Anders Ljusbäck
2f76702291
fix(vue-renderer): add crossorigin for styles (#7954)
* Added ability for styles to get crossorigin if set

* refactor to addAttrs

Co-authored-by: Clark Du <clark.duxin@gmail.com>
2020-08-26 13:03:31 +01:00
Alexander Lichter
a969e87014
chore: add avif format as image (#7961) 2020-08-25 15:10:22 +01:00
Daniel Roe
f1a95c8af8
fix(vue-renderer): apply nomodule to legacy chunks (#7928)
closes #7927
2020-08-16 19:02:10 +02:00
Xin Du (Clark)
68b9183c4c
fix(modern): missing nomodule on legacy modules (#7919) 2020-08-14 23:59:10 +02:00
Harlan Wilton
124cb0994a
feat(vue-renderer): add vue-renderer:spa:prepareContext hook (#7633)
[release]
2020-07-09 15:15:41 +02:00
Pim
df7e1ad3a2
fix(vue-renderer): fix meta injection when ssr renderer generates a spa page (#7439) 2020-06-10 17:26:50 +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
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
Xin Du (Clark)
b1b14033fb
fix(modern): wrong assets mapping in ssr client modern mode (#7382) 2020-05-17 21:41:07 +02:00
Pim
224c3794ae
fix(vue-renderer): base tag should be before any link or script tag (#7376) 2020-05-16 18:03:24 +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
Xin Du (Clark)
c02ded2d86
refactor(config): move build.crossorigin to render.crossorigin (#7187) 2020-04-07 11:38:49 +02:00
Jimmy
6b1faaed80
feat(vue-renderer): add head <base> meta for spa (#7170) 2020-04-07 11:11:00 +02:00
Eunjae Lee
4f6f7fe1cd
feat(vue-renderer): pass renderContext to vue-renderer:ssr:templateParams hook (#7168) 2020-04-02 11:28:57 +02:00
Pooya Parsa
6e09e7824d
fix(core): correct deprecated hooks (#7002) 2020-02-25 17:15:40 +01:00
Xin Du (Clark)
16587029d7
feat: add crossorigin for normal ssr (#6950) 2020-02-24 22:58:24 +00:00
Pim
bfad1e627b
perf(vue-renderer): early return render when redirect happens (#6973) 2020-02-16 14:20:08 +01:00
404-NOTFOUND
af75aa86e1 perf(vue-renderer): don't serialize session when injectScripts is false (#6846) 2020-01-10 21:43:50 +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
PedroD
257ae2279b fix(config): typo in unsafeInlineCompatibility name (#6583) 2019-10-19 10:15:07 +02:00
Pim
b17f331fe5 feat: support setting (non-essential) vue-meta options by user (#6432) 2019-09-18 15:51:44 +02:00
Pim
2d0f28fa75 fix(vue-renderer): dont mutate options.head (#6429) 2019-09-17 15:14:10 +02:00
Pim
174c13d56c feat(vue-app): support configurable features (#6287) 2019-09-05 17:15:27 +02:00
Pim
df424e56cb feat(vue-renderer): support prepend/append body tags during ssr for all allowed tag types (#6134) 2019-08-19 23:08:13 +04:30
Dzmitry Bachko
76b1167d27 fix: modulepreload warnings (#6118) 2019-07-24 18:01:33 +01:00
pooya parsa
e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30
Xin Du (Clark)
a1124d2fff
fix(renderer): correctly load nomodule scripts in safari 10 (#6033) 2019-07-06 16:22:50 +01:00
Ustun Ozgur
ae9d3519f7 fix(vue-renderer): clone spa meta to prevent cache modification (#5964) 2019-06-28 00:47:43 +04:30
William Chong
cf39c75711 feat(vue-renderer): add csp option for csp v1 compatibility (#5975) 2019-06-26 16:22:45 +01:00
Pooya Parsa
31f5729828
fix(vue-renderer): prevent can't set headers after they are sent (#5863) 2019-06-04 19:19:18 +04:30
Pooya Parsa
7e50fe744f
fix(vue-renderer): add vary header for ‍user-agent‍ in modern server mode (#5807) 2019-05-26 00:24:00 +04:30
aidou
0fc8ee41d1 feat(vue-renderer): render.injectScripts option (#5745) 2019-05-25 22:49:10 +04:30
Xin Du (Clark)
21aaef3b48 feat(vue-renderer): support render.ssrLog for controlling SSR logs (#5784) 2019-05-23 14:19:16 +04:30
pooya parsa
ffb1844646 update args logging 2019-05-20 20:35:17 +04:30
Xin Du (Clark)
106836f806 fix(vue-app): wrong index and string in ssr log (#5771) 2019-05-20 18:39:35 +04:30
Pooya Parsa
38fc721f50
fix(vue-renderer): safe format ssr logs (#5764) 2019-05-19 23:19:24 +04:30
Sébastien Chopin
4b11dcc9ad feat(vue-renderer/vue-app): report SSR console logs to the browser with consola (#5673) 2019-05-09 11:36:17 +04:30
Xin Du (Clark)
56d5c0c548 fix(vue-renderer): await on spa:templateParams hook (#5619)
fixes #5601
2019-04-29 13:05:33 +04:30