Commit Graph

37 Commits

Author SHA1 Message Date
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
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
Pooya Parsa f20d932c4d
feat: allow disabling loading-screen (#6272) 2020-03-13 21:23:33 +01:00
Pooya Parsa 00d95903c6
fix(webpack): provide global `URL` and `URLSearchParams` (#6864) 2020-01-19 09:37:06 +01:00
Alexander Lichter 75bb0884cb feat: optionally strip non-client or non-server code (#6149) 2019-11-24 16:39:45 +01:00
Xin Du (Clark) 9ada4e63a9 feat(config): add `ignoreOptions` for `node-ignore` (#6597) 2019-11-24 13:28:37 +01:00
Daniel Roe 46a7a67ad4 feat(cli, config): `cli.bannerColor` option (#6399) 2019-09-30 10:46:58 +02:00
Snir Shechter 92c7f4ed24 feat(builder): `followSymlinks` option to allow for symlinks (#6368) 2019-09-29 11:06:44 +02:00
Alexander Lichter c202893b9e fix(webpack): correct sass options for `sass-loader@8` (#6460) 2019-09-26 14:10:54 +02:00
Pim b17f331fe5 feat: support setting (non-essential) vue-meta options by user (#6432) 2019-09-18 15:51:44 +02:00
Pim 174c13d56c feat(vue-app): support configurable features (#6287) 2019-09-05 17:15:27 +02:00
Jonas Galvez 81f0c8af33 feat(builder): `extendPlugins` option and `builder:extendPlugins` hook (#6285) 2019-09-04 14:19:50 +02:00
Alexander Lichter 7c90310166 feat(builder, router): enforce uniform trailing slash handling (#6331) 2019-09-01 16:37:25 +02:00
Pooya Parsa 81b92b6395
fix: improve watching experience for generated files (#6257) 2019-08-21 23:34:04 +04:30
Pooya Parsa 560cb57443
refactor(config): rename `devModules` to `buildModules` (#6203) 2019-08-09 15:02:53 +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
Kevin Marrec 81b5ce22ce feat: externalize typescript support (#5858) 2019-07-24 11:56:44 +04:30
Xin Du (Clark) 3195f34531 feat: upgrade css-loader to v3 (#5929) 2019-06-15 14:43:05 +04:30
Pooya Parsa cb1b980d8a
feat(vue-app): allow customizing loading indicator (#5844) 2019-06-06 12:39:28 +04:30
Kevin Marrec 262ea5c31a refactor: prepare for external typescript support (#5854) 2019-06-05 00:18:01 +04:30
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
Pim 1f2bf1c3d3 fix(builder): only listen for file changes for supported extensions (#5812) 2019-05-27 13:36:53 +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
Yama-Tomo 1e4708e90f feat(webpack): suppress not found typescript warnings (#5635) 2019-05-10 14:48:44 +04:30
Pooya Parsa 8576b4fcfd
feat: configurable aliases (#5655) 2019-05-06 18:29:37 +04:30
Sébastien Chopin 01acf66c67 feat(vue-app): rename `transition` to `pageTransition` and deprecate it (#5558) 2019-04-20 14:31:59 +04:30
Pooya Parsa d0afaa1daf
fix(cli): config cache invalidation + refactors (#5500) 2019-04-11 14:34:21 +04:30
Xin Du (Clark) 64fa4244d0 fix(build): disable loading `babel.config.js` by default (#5365) 2019-03-24 22:14:22 +04:30
Kevin Marrec 920f444b6e refactor(ts): better DX for typescript support (#5079)
Breaking change : `build.useForkTsChecker` renamed to `build.typescript.typeCheck`
2019-03-14 13:37:47 +03:30
Jonas Galvez e87711c5e7 feat: support `devModules` option (#5102) 2019-03-03 11:19:46 +03:30
Pooya Parsa 2015140d12 feat(vue-app): universal fetch (#5028)
* pkg(nuxt-start): add node-fetch, unfetch

* pkg(vue-app): add node-fetch, unfetch

* add yarn.lock

* feat(config): _app.fetch options

* feat(builder): add fetch to templateVars

* feat(vue-app): polyfill global with fetch

* feat(fixtures/basic): /api/test

* add fetch example to fixtures

* remove unfetch from nuxt-start

* update template snapshot

* revert extra new line in server.js

* single line if
2019-02-14 16:56:58 +01:00
Xin Du (Clark) b23f5c9b4b feat(server): timing option for `Server-Timing` header (#4800) 2019-01-19 21:44:54 +03:30
Xin Du (Clark) a616c09b22 feat(test): unit tests for core/config module (#4760)
* feat(test): enable tests in packages

* fix: wait error hook

* test: entry and hookable in core

* fix(test): options snapshot in windows

* refactor(test): simpilify jest.fn

* test: module in core

* test: complete module test

* test: add test for resolver in core

* test: update config snapshot

* test: nuxt in core module
2019-01-19 13:00:51 +01:00
Clark Du e594f09914
test: mock require.main 2019-01-14 20:31:39 +00:00
Clark Du d02eb2f958 fix(test): remove local paths 2019-01-14 19:47:00 +00:00
Clark Du bd1ae0b9df test: add unit tests for @nuxt/config 2019-01-14 17:40:15 +00:00