Commit Graph

59 Commits

Author SHA1 Message Date
Daniel Roe 0bcbaacfa6
fix(cli): disable parallel build behaviour when generating (#8683)
closes #7390
2021-01-26 23:10:32 +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
renovate[bot] e934da3c36
chore(deps): update devdependency @nuxtjs/eslint-config to v5 (#8345)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Clark Du <clark.duxin@gmail.com>
2020-11-14 17:10:53 +00:00
Steve Perkins 2547605164
fix(cli): grammatical errors (#8219)
* Fixed grammatical errors

* Update packages/cli/src/commands/generate.js

Co-authored-by: Daniel Roe <daniel@roe.dev>

Co-authored-by: pooya parsa <pyapar@gmail.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2020-10-19 11:58:42 +02:00
Sébastien Chopin 7e7190b90d
fix: add better logs for DX with target option (#8206)
* fix: add better logs for DX with target option

* chore: add warning for old nuxt build in ssr false

* Update generator.js

* Update generate.js

* chore: better logs

* fix: update
2020-10-15 18:12:06 +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
pooya parsa b0274357b3
fix(cli): listen to a random port for export and generate (#7608) 2020-06-25 16:48:04 +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
Deniz Temizer b45f284771
chore(cli): enhance generate no-build description (#6031) (#7460) 2020-06-04 20:41:09 +02:00
Pooya Parsa 925abf8123
chore(pkg): update rollup and dependencies (#7373)
* chore(pkg): show build error loc

* fix(cli): add nuxt serve dependencies

* chore: update rollup resolve and commonjs plugins to latest

* test: mock listener for nuxt serve
2020-05-16 15:07:56 +02: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
Pooya Parsa 903c3de5b6
feat: expose webpack config (#7029) 2020-03-02 19:15:00 +01:00
James George 3c4f9e4574 chore(cli): display listening urls after build (#6904)
closes #6899
2020-01-23 13:13:14 +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
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
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
Alexander Lichter d08ce2f628 refactor: small readability improvements (#5748) 2019-05-16 14:38:44 +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
Pim 19fbbb6ef6 fix(cli): show memory usage after build for `nuxt dev` (#5514) 2019-04-12 21:49:46 +04:30
Pooya Parsa d0afaa1daf
fix(cli): config cache invalidation + refactors (#5500) 2019-04-11 14:34:21 +04:30
Pooya Parsa 516aea3d7f
feat(cli): add internal _generate and _build options (#5434) 2019-04-01 20:18:24 +04:30
Franck Abgrall 91f4eb0468 feat(cli): add `--quiet` option to nuxt generate command (#5357) 2019-03-29 18:38:08 +04:30
pooya parsa c46def75cf fix(cli): enable server for implicit SPA generate in nuxt build
revert it back with nuxt 3
2019-03-21 14:29:05 +03:30
Sébastien Chopin ef41e205e6 feat: loading screen (#5251)
[release]
2019-03-20 12:47:53 +03:30
Jarek Lipski c6565c97c6 feat(generate): return non-zero code or page error (fixes #4991) (#5195) 2019-03-11 23:25:54 +03:30
Pooya Parsa 13cb0f73d9 refactor: remove builder coupling from server (#5157) 2019-03-08 20:43:23 +00:00
Pim 4e51723efc feat(cli): lock project during build or generate (#4985) 2019-03-03 11:42:46 +03:30
Alexander Lichter 69dfd848d7 refactor: some small stuff (#4979)
* refactor: flatten ifs

* refactor: unnecessary curly brackets

* refactor: unnecessary else

* refactor: promise.all instead of for-await

* refactor: apply changes suggested by @clarkdo

* chore: fix typo

* refactor: early return

* refactor: add removal TODOs

* refactor: more descriptive variable name

* refactor: prefer template string

* refactor: one-line

* refactor: early returns

* refactor: early return

* refactor: parallel promises

* refactor: early return and no else

* refactor: spread operator

* refactor: spread operator and early return

* fix: remove error and throw string instead

* fix: always return true

* refactor: clear multiline ternary

* refactor: err stack assignment

* refactor: early return and async/await

* refactor: one line

* refactor: early return

* refactor: early return

* refactor: promise.all

* refactor: args spread
2019-02-08 17:25:11 +01:00
Alexander Lichter 574a2eb293 fix: disable "analyze" for nuxt generate (#4975) 2019-02-07 18:30:41 +03:30
Ricardo Gobbo de Souza 4c7bd9c507 feat(cli): option to open the project in the browser (#4930) 2019-02-06 01:07:59 +03:30
Alexander Lichter 40fbe5ba47 refactor: cleanups and code style improvements (#4788) 2019-01-18 00:48:29 +03:30
Pooya Parsa bdb6791e40
feat(webpack,cli): standalone build mode (#4661)
* feat(webpack,cli): standalone build mode

* revert typo
2019-01-03 23:57:50 +03:30
Jonas Galvez 0145551c3a feat(cli): improvements and external commands (#4314) 2018-12-20 14:45:48 +03:30
Sébastien Chopin 25dea5f52a fix(dev): Show correct path when webpack watched files changed 2018-12-09 12:47:57 +01:00
Pooya Parsa fe0516978a
fix: improvements for build and dev stability (#4470) 2018-12-09 14:12:22 +03:30
Pooya Parsa 0f104aa588
feat: improve SSR bundle (#4439)
- Better insights and inspection for server bundle
- Remove all vue related dependencies from vue-renderer package as much as possible to reduce install size of nuxt-start
- Support for single file distributions (serverless)
- Remove server-bundle.json and use the standard .js files for dist/server
- Mitigate CALL_AND_RETRY_LAST Allocation failed errors. Most of the cases happen on JSON.parse() the part when loading bundle. (#4225, #3465, #1728, #1601, #1481)
- Reduce server dist size by removing escape characters caused by JSON serialize
- Faster dev reloads and production start by removing extra JSON.serialize/JSON.parse time
- Less memory usage
- General performance improvements and refactors
2018-12-01 13:43:28 +03:30
Clark Du 4c2708849f
fix: modern=true or false not work as expected (#4378) 2018-11-22 15:48:26 +00:00
Yuki Takemoto e6f73b596a feat(cli): add `--devtools` option for build and generate (#4357) 2018-11-17 23:05:51 +00:00
Clark Du 18e613106b Revert "fix: make generate default value be false in build command" 2018-11-09 17:14:26 +00:00
Clark Du e4fe2409f5 fix: make generate default value be false in build command 2018-11-09 16:32:04 +00:00
Pooya Parsa c62c9656ab fix(dev): better icon for windows support 2018-11-08 14:55:48 +03:30
Clark Du 78de0956cc fix: --modern not trigger modern build 2018-11-08 09:19:09 +00:00
Pooya Parsa 7c4e77ffb9
feat: dx improvements (#4259) 2018-11-08 12:45:56 +03:30
Clark Du 2a36dbad22
feat: client mode modern and support dev/generate (#4264) 2018-11-07 23:37:06 +00:00
Clark Du 17e0890c90 fix(cli): remove duplicate error message in start and build (#4258) 2018-11-02 17:24:58 +03:30
Sébastien Chopin 12151d81d6 feat: add --modern to nuxt start (#4254) 2018-11-02 09:07:39 +00:00
Jonas Galvez 19287cce96 feat(cli): add help command (#4248)
* add commands/help

* simply cmds in run()

* refinement

* simply cmds in run() (2)

* simply cmds in run() (3)

* lint

* cmd.showHelp()

* check for cmd / uknown cmd

* final fix

* fixes

* remove Set

* Add NuxtCommand.load()

* updated tests

* lint
2018-11-02 05:35:32 +01:00