Commit Graph

860 Commits

Author SHA1 Message Date
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)
789f0e6555
chore(dep): upgrade html-webpack-plugin to v4 (#7119) 2020-05-07 11:52:26 +01:00
renovate[bot]
c37c3d4da0
chore(deps): update all non-major dependencies (dev) (#7269) 2020-05-07 09:33:52 +01:00
Xin Du (Clark)
f1d832018a
chore(test): upgrade vue test utils to v1 (#7321) 2020-05-07 09:07:21 +01:00
Xin Du (Clark)
8c7228f1e8
test: update jest to v26 (#7319) 2020-05-05 23:53:07 +02:00
Clark Du
8538368837 chore(deps): ignore @rollup/plugin-commonjs 11.1.0
Due to https://github.com/rollup/plugins/issues/304
2020-04-26 18:03:14 +01:00
Clark Du
a59bbc2cf3 chore(ci): fix build failure from rollup commonjs plugin
the fixed package resolution can be removed after https://github.com/rollup/plugins/issues/304 gets fixed
2020-04-26 17:48:26 +01:00
Xin Du (Clark)
1ce8041abe
feat(config): add configOverrides for loadNuxt and loadNuxtConf… (#7263) 2020-04-24 09:59:56 +01:00
renovate[bot]
5516a2182b
chore(deps): update all non-major dependencies (dev) (#7255)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-24 09:13:20 +01:00
renovate[bot]
67b8020c11
chore(deps): update dependency caniuse-lite to ^1.0.30001045 (d… (#7248) 2020-04-21 09:27:20 +01:00
renovate[bot]
3a6dbdd656
chore(deps): update all non-major dependencies (dev) (#7234) 2020-04-20 21:13:50 +01:00
renovate[bot]
1151a87895
chore(deps): update devdependency got to v11 (dev) (#7241) 2020-04-20 21:13:09 +01:00
renovate[bot]
cf205e7902
chore(deps): update all non-major dependencies (#7188)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-17 11:26:43 +02:00
renovate[bot]
8b5351bc9d
chore(deps): update devdependency improved-yarn-audit to v2 (#7216)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-17 11:05:28 +02:00
renovate[bot]
dc18f4f670
chore(deps): update devdependency puppeteer-core to v3 (#7225)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-17 11:05:02 +02:00
Lucas Löffel
7845509d7b
chore: add ls-lint (#7228) 2020-04-16 16:25:40 +02:00
renovate[bot]
20f086d0ce
chore(deps): update all non-major dependencies (dev) (#7179) 2020-04-06 23:14:25 +01:00
renovate[bot]
ba938320d0
chore(deps): update devdependency rollup-plugin-license to v2 (… (#7182) 2020-04-06 23:03:27 +01:00
renovate[bot]
21b39fc701
chore(deps): update all non-major dependencies (dev) (#7157) 2020-04-05 11:58:52 +01:00
renovate[bot]
1a5515f792
chore(deps): update all non-major dependencies (dev) (#7148)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-30 10:49:32 +01:00
renovate[bot]
d46c2dd4ff
chore(deps): update all non-major dependencies (#7136)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-27 13:57:09 +01:00
renovate[bot]
f18e241f70
chore(deps): update all non-major dependencies (dev) (#7125) 2020-03-26 16:30:01 +00:00
renovate[bot]
a474c00aae
chore(deps): update dependency webpack to ^4.42.1 (#7121) 2020-03-24 10:42:43 +01:00
renovate[bot]
60f1aa93bd
chore(deps): update all non-major dependencies (dev) (#7100) 2020-03-23 11:24:29 +00:00
pooya parsa
1f3c3ad9f3 chore: only pin @babel/parser for babel-eslint
closes #6871
2020-03-17 18:06:06 +01:00
pooya parsa
c3185c88f5 chore(deps): lock file maintenance 2020-03-17 17:42:23 +01:00
pooya parsa
87dc99e8e5 chore(deps): update all non-major dependencies 2020-03-13 15:03:36 +01:00
Xin Du (Clark)
78bce82b2f
refactor(babel-preset-app): use @babel/helper-compilation-targets instead of deprecated api (#7071) 2020-03-12 19:13:04 +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
renovate[bot]
1a34e224d4
chore(deps): update all non-major dependencies (#7052)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-09 14:41:20 +01:00
pooya parsa
49d751f3f0 chore(deps): update dependency rollup to v2 2020-03-09 13:37:35 +01:00
pooya parsa
0a9077fe42 update lock file 2020-03-09 13:28:26 +01:00
renovate[bot]
2c4327b867
chore(deps): update all non-major dependencies [release] (#7039) 2020-03-02 19:15:30 +01:00
renovate[bot]
83856010ee
chore(deps): update devdependency rollup to ^1.32.0 (#7023)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-28 12:55:17 +01:00
renovate[bot]
ee2cceb9b2
chore(deps): update all non-major dependencies (dev) (#7010) 2020-02-27 15:09:23 +00:00
renovate[bot]
07906d0b9d
chore(deps): update all non-major dependencies (#7003)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-26 13:22:04 +01:00
Pooya Parsa
6e09e7824d
fix(core): correct deprecated hooks (#7002) 2020-02-25 17:15:40 +01:00
renovate[bot]
c785f6e22e
chore(deps): update dependency caniuse-lite to ^1.0.30001030 (#6994)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-24 23:49:38 +01:00
renovate[bot]
6d79206a68
chore(deps): update dependency serialize-javascript to v3 (#6977)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-24 22:41:53 +01:00
renovate[bot]
fd5fefee2d
chore(deps): update devdependency got to ^10.6.0 (#6989)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-20 16:43:54 +00:00
renovate[bot]
53d61f2604
chore(deps): update devdependency sort-package-json to ^1.40.0 (#6983)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-02-19 20:46:45 +00:00
renovate[bot]
e88501c02b
chore(deps): lock file maintenance (#6957) 2020-02-18 17:23:27 +00:00
renovate[bot]
bfc91f9682
chore(deps): update all non-major dependencies (#6978) 2020-02-18 17:01:11 +00:00
renovate[bot]
19fd3e4932
chore(deps): update all non-major dependencies (#6956) 2020-02-16 14:58:21 +01:00
renovate[bot]
c865cef032
chore(deps): update devdependency rimraf to ^3.0.2 (#6952) 2020-02-09 11:04:59 +00:00
renovate[bot]
96d2a889ef
chore(deps): update devdependency got to ^10.5.5 (#6949) 2020-02-08 22:23:21 +00:00
renovate[bot]
602667bfbf
chore(deps): update all non-major dependencies (#6943) 2020-02-08 19:53:14 +00:00
Pooya Parsa
1df1874f8a fix(pkg): add explicit dependencies 2020-02-06 13:57:42 +01:00
Pooya Parsa
e9aa6afe3b chore(deps): downgrade @rollup/plugin-node-resolve because of regression 2020-02-06 13:55:30 +01:00