Commit Graph

279 Commits

Author SHA1 Message Date
renovate[bot] 8af076d5e6
chore(deps): update all non-major dependencies (dev) (#7326) 2020-05-11 09:14:28 +01:00
Sébastien Chopin e87bad4cce
fix(cli): add back flags for generate and add _export flag (#7334) 2020-05-08 16:15:26 +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) 8c7228f1e8
test: update jest to v26 (#7319) 2020-05-05 23:53:07 +02:00
Xin Du (Clark) 16b9c157bf
feat(webpack): add mjs to babel-loader (#7178) 2020-04-05 15:41:21 +02:00
pooya parsa 8d355956d4 v2.12.1
[release]
2020-03-25 20:20:50 +01:00
pooya parsa 205a089f83 v2.12.0 2020-03-17 17:43:35 +01:00
pooya parsa 87dc99e8e5 chore(deps): update all non-major dependencies 2020-03-13 15:03:36 +01:00
renovate[bot] 29587daf1f
chore(deps): update all non-major dependencies (#7073)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-12 18:59:48 +01:00
renovate[bot] 2afddf03c1
chore(deps): update all non-major dependencies (dev) (#7066) 2020-03-10 22:43:29 +00:00
Pooya Parsa 903c3de5b6
feat: expose webpack config (#7029) 2020-03-02 19:15:00 +01:00
Pooya Parsa 6e09e7824d
fix(core): correct deprecated hooks (#7002) 2020-02-25 17:15:40 +01:00
Pooya Parsa d83f697c15 chore: sort package.json 2020-02-06 13:32:56 +01:00
renovate[bot] 73a4a8081a chore(deps): update dependency chalk to v3 (#6673)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
2020-01-24 01:06:49 +00:00
James George 3c4f9e4574 chore(cli): display listening urls after build (#6904)
closes #6899
2020-01-23 13:13:14 +01:00
Clark Du fdd9a7a051 test: avoid unexpected outside stderr assertion count 2020-01-19 10:26:44 +00:00
Pooya Parsa 2707bdb37e
feat: improve programatic usage (#6868) 2020-01-19 09:36:06 +01:00
Pim 75e00fe69f feat(cli): pass context when nuxt.config exports a function (#6855) 2020-01-13 17:35:08 +01:00
renovate[bot] aada6e50d9 chore(deps): update dependency consola to ^2.11.3 (#6839) 2020-01-01 12:42:55 +01:00
Renovate Bot 14e6eb6b27
chore(deps): update all non-major dependencies 2019-12-29 22:19:43 +00:00
Pooya Parsa 7af9ec8c23 v2.11.0 2019-12-17 11:22:18 +01:00
renovate[bot] 51b3163c2a chore(deps): update dependency consola to ^2.11.1 (#6800) 2019-12-17 10:59:30 +01:00
renovate[bot] d427e4abc3 chore(deps): update all non-major dependencies (#6761) 2019-12-08 02:02:34 +00: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
renovate[bot] dd0b7a8b0e chore(deps): update all non-major dependencies (#6724) 2019-11-25 12:09:13 +00:00
renovate[bot] abd82805a7 chore(deps): update all non-major dependencies (#6677) 2019-11-12 10:42:05 +00:00
renovate[bot] d2d0e11455 chore(deps): update all non-major dependencies (#6603) 2019-10-28 14:57:09 +01:00
Pooya Parsa f6aa45dda6 v2.10.2 [release] 2019-10-21 23:16:29 +02:00
renovate[bot] a3f1957adc chore(deps): update dependency execa to v3 (#6563) 2019-10-19 10:40:26 +02:00
Pooya Parsa 624c4c058e v2.10.1 [release] 2019-10-11 10:08:40 +02:00
Pim 67d5601142 test: refactor cli integration tests (#6537) 2019-10-11 09:35:10 +02:00
Clark Du a0ef4a3736 Merge remote-tracking branch 'origin/2.x' into dev 2019-10-09 19:07:10 +01:00
Xin Du (Clark) 6f2f13e7e7
chore(deps): upgrade execa to 2.1.0 (#6542) 2019-10-09 19:04:49 +01:00
Dmitry Molotkov 136777de1d fix(cli): enable server for build when spa pages should be generated (#6525) 2019-10-08 10:33:42 +02:00
renovate[bot] 2b1366b965 chore(deps): update all non-major dependencies (#6496) 2019-10-08 10:31:09 +02:00
Pooya Parsa c17afa77a7 v2.10.0
[release]
2019-10-02 13:40:59 +02:00
Daniel Roe 46a7a67ad4 feat(cli, config): `cli.bannerColor` option (#6399) 2019-09-30 10:46:58 +02:00
Pim 27e03531d6 feat(cli): catch build errors with `cli:buildError` hook (#6475) 2019-09-29 10:11:32 +02:00
Xin Du (Clark) 95e043f167 fix(cli): server should not be initialized in nuxt build (#6441) 2019-09-20 20:49:38 +02:00
Kevin Marrec 05a6efd1eb chore: rename setup hook to run:before (#6363) 2019-09-05 10:45:39 +02:00
Kevin Marrec bdcf4c8304 refactor(cli): call setup hook in run command with more args (#6353) 2019-09-04 12:06:34 +02:00
Renovate Bot 88fb44c6df chore(deps): update dependency hable to ^2.3.2 2019-09-02 12:36:41 +02:00
Clark Du c8ee9a6608 v2.9.2 2019-08-28 12:32:12 +01:00
Pooya Parsa f0ab042bf4
chore(cli): accept hooks (#6274) 2019-08-24 18:45:08 +04:30
pooya parsa 0157b971de v2.9.1 2019-08-20 15:41:35 +04:30
pooya parsa ce3b456961 v2.9.0 2019-08-20 12:51:10 +04:30
renovate[bot] 8f5244cabd chore(deps): update all non-major dependencies (#6213) 2019-08-17 15:54:58 +01:00
pooya parsa de7ed24b36 feat(cli): export options (#6206)
Co-Authored-By: Kevin Marrec <kevin@marrec.io>

[release]
2019-08-09 18:40:19 +04:30
renovate[bot] cb22d841fe chore(deps): update all non-major dependencies (#6193) 2019-08-09 15:04:17 +04:30
renovate[bot] 275c4dc2f1 chore(deps): update dependency consola to ^2.10.0 (#6189) 2019-08-05 13:54:24 +01:00
renovate[bot] 1ebf6cbfa0 chore(deps): update all non-major dependencies (#6121) 2019-07-27 09:55:08 +01:00
Kevin Marrec 81b5ce22ce feat: externalize typescript support (#5858) 2019-07-24 11:56:44 +04:30
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) e63923419a fix error when use alias for nuxt-edge (#6051) 2019-07-10 14:27:31 +04:30
renovate[bot] 9014251c1f chore(deps): update all non-major dependencies (#6030) 2019-07-06 16:22:27 +01:00
Xin Du (Clark) e6acdbc9bf fix(cli): prevent both `nuxt` & `nuxt-edge` being installed (#6020) 2019-07-04 17:28:07 +04:30
renovate[bot] 9d04b8fb52 chore(deps): update all non-major dependencies (#6003) 2019-07-01 18:41:18 +01:00
renovate[bot] ae82a03a28 chore(deps): update all non-major dependencies (#6001)
Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
2019-06-29 05:49:55 +01:00
renovate[bot] 2a0a34f629 chore(deps): update all non-major dependencies (#5997) 2019-06-28 11:53:20 +04:30
Xin Du (Clark) d1395a032a chore: upgrade fs-extra to v8 (#5994) 2019-06-28 00:33:44 +04:30
renovate[bot] 79877b4ec3 chore(deps): update dependency execa to v2 (#5984)
Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
2019-06-25 16:48:53 +01:00
Ricardo Gobbo de Souza 43a43bc924 fix: downgrade fs-extra to v7 for fixing jest crashing (#5977) 2019-06-25 15:58:20 +01:00
renovate[bot] 99176aa261 chore(deps): update all non-major dependencies (#5955) 2019-06-24 10:00:31 +01:00
renovate[bot] 7d08ff1f4a chore(deps): update dependency consola to ^2.8.0 (#5953) 2019-06-18 17:41:23 +04:30
renovate[bot] b809d58dc8 chore(deps): update dependency wrap-ansi to v6 (#5914) 2019-06-12 09:14:30 +01:00
renovate[bot] 2467dabf9f chore(deps): update all non-major dependencies (#5894) 2019-06-12 09:14:00 +01:00
pooya parsa 2fabea9402 v2.8.1 2019-06-05 00:55:47 +04:30
Pooya Parsa e4fd6fee7e
fix(cli): don't mutate options export (#5865) 2019-06-04 19:18:06 +04:30
pooya parsa 7622d66866 v2.8.0 2019-05-30 21:37:38 +04:30
Pooya Parsa f39fe2279e
refactor: improve build indicator (#5832)
[release]
2019-05-30 14:33:57 +04:30
Xin Du (Clark) d149e9fb64
chore: upgrade boxen to v4 (#5830) 2019-05-30 10:25:36 +01:00
renovate[bot] 1f74362d38 Update dependency consola to ^2.7.1 (#5809) 2019-05-26 14:44:05 +04:30
renovate[bot] f00f02171f Update all non-major dependencies (#5808) 2019-05-26 14:28:57 +04:30
Dmitry Molotkov 5ae03d0d4b chore(deps): unpin and update esm (#5804) 2019-05-25 18:47:02 +04:30
Alexander Lichter d08ce2f628 refactor: small readability improvements (#5748) 2019-05-16 14:38:44 +04:30
renovate[bot] c2c2945f05 chore(deps): update all non-major dependencies (#5735) 2019-05-15 15:56:07 +04:30
pooya parsa 0f609dfb37 v2.7.1 2019-05-14 23:24:56 +04:30
pooya parsa 5a98230ec6 v2.7.0 2019-05-14 17:05:38 +04:30
renovate[bot] 017d3a490a chore(deps): update all non-major dependencies (#5715) 2019-05-14 12:36:07 +04:30
Kevin Marrec 0c7e500699 fix: prevent `ts-node` to register twice (#5699) 2019-05-11 21:21:19 +04:30
renovate[bot] 8019c9c7db chore(deps): update dependency fs-extra to v8 (#5702) 2019-05-11 21:12:55 +04:30
Sébastien Chopin 03eb049677
fix(builder): watch store dir and `serverMiddleware` paths (#5681)
* fix(builder): Watch store dir to restart Nuxt app when options.store=false

* hotfix: Linting issues

* hotfix: Use path.resolve instead of path.join

* test: Update test for watcher

* hotfix: revert to path.join and fix tests

* hotfix: Fix coverage for hard to test condition

* hotfix: Fix test for Windows

* Update builder.js

* fix lint error

* fix: Cache serverMiddlewarePaths
2019-05-10 15:03:07 +02:00
renovate[bot] 2fd05e0fe3 chore(deps): update dependency consola to ^2.6.1 (#5674) 2019-05-08 21:36:11 +04:30
renovate[bot] 989add8fb2 chore(deps): update all non-major dependencies (#5628) 2019-05-01 17:17:38 +01:00
renovate[bot] 905de666f2 chore(deps): update all non-major dependencies (#5591) 2019-04-29 12:03:21 +04:30
pooya parsa a5cf705ed8 v2.6.3 2019-04-25 13:13:50 +04:30
pooya parsa 91c3642e64 fix: don't customize esm options
options like `{ cjs: { }  }` resets other defaults. this ensures consitency of usage

[release]
2019-04-21 22:20:32 +04:30
Pooya Parsa c9a95429eb
fix(cli): watch and reload `nuxt.config` (#5574)
[release]
2019-04-21 15:39:26 +04:30
pooya parsa 6cee89324f v2.6.2 2019-04-15 20:45:03 +04:30
Pooya Parsa ff340abe6f
v2.6.2 (#5523) 2019-04-15 20:43:27 +04:30
pooya parsa c0776eb2d7 v2.6.1 2019-04-04 22:28:06 +04:30
pooya parsa 53915c55b3 fix: pin esm to 3.2.20 (#5464) 2019-04-04 22:27:27 +04:30
pooya parsa 0e51676731 v2.6.0 2019-04-04 21:36:17 +04:30
renovate[bot] 913069ff59 chore(deps): update all non-major dependencies (#5447) 2019-04-03 11:42:43 +04:30
Pooya Parsa 516aea3d7f
feat(cli): add internal _generate and _build options (#5434) 2019-04-01 20:18:24 +04:30
Pooya Parsa 832bd12091
refactor(typescript): use an object for _typescript (#5418) 2019-03-30 00:39:20 +04:30
Pooya Parsa 6ffc5c5792
feat(typescript): detect typescript based on `tsconfig.json` (#5412) 2019-03-29 23:49:30 +04:30
renovate[bot] 82bde15622 chore(deps): update dependency consola to ^2.5.8 (#5416) 2019-03-29 23:01:21 +04:30
Franck Abgrall 91f4eb0468 feat(cli): add `--quiet` option to nuxt generate command (#5357) 2019-03-29 18:38:08 +04:30
renovate[bot] 7ce30935fa chore(deps): update all non-major dependencies (#5402) 2019-03-29 18:36:03 +04:30