Commit Graph

40 Commits

Author SHA1 Message Date
Daniel Roe
9f6131edd3
fix(builder): resolve aliases in build.watch paths (#9153) 2021-04-15 21:17:15 +02:00
Sébastien Chopin
8b1a70476a
fix(builder): use path.resolve for pages dir (#8832) 2021-02-15 21:53:03 +01:00
Pooya Parsa
ed6e8cd307 chore(builder): remove validateTemplate check
by introducing pnp support, there is no stable way to resolve same as webpack
2020-12-23 00:06:08 +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
Tim van den Eijnden
2e5184688f
fix(generator, builder): empty build and dist directories instead of remove (#7361) 2020-05-13 16:46:13 +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
Jt Whissel
51b5bf565b
feat(builder): ignore option to function the same as .nuxtignore (#7132) 2020-03-27 11:53:23 +01:00
Mark Honeychurch
084a1ca1af
chore(builder): analyze mode warning rewording (#6924) 2020-02-25 00:16:43 +01:00
Pooya Parsa
8907e1553f
feat: HMR support for serverMiddleware (#6881) 2020-01-19 09:34:35 +01:00
Pooya Parsa
311ff27ba6 test: mock semver/functions/satisfies 2019-12-17 11:00:07 +01:00
Pooya Parsa
4669b6b58d test: semver is not mockable 2019-12-16 22:59:20 +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
Pim
06a288376a fix(webpack): dont push to compilersWatching in callback (#6448) 2019-09-25 17:11:39 +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
Pim
ad223583fc feat(builder): add builder:prepared hook (#6329) 2019-09-02 15:26:21 +02:00
Pim
e78e8b4b7d feat(builder): support adding custom middlewares (#6342) 2019-09-02 12:53:52 +02:00
Pooya Parsa
7f542e08e5
fix(builder): apply overrides from app dir only (#6283)
[release]
2019-08-24 21:40:39 +04:30
Pooya Parsa
81b92b6395
fix: improve watching experience for generated files (#6257) 2019-08-21 23:34:04 +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
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
Sébastien Chopin
e75d65b268 fix(builder): watch for pages/ creation when default page displayed (#5753) 2019-05-23 14:49:37 +04:30
Xin Du (Clark)
737d5f0fe7 refactor(builder): pass nuxt options to template as nuxtOptions (#5792) 2019-05-23 13:19:40 +04:30
Pooya Parsa
62a593dcfd
fix(builder): use warn only for mismatched deps (#5723) 2019-05-14 18:05:31 +04:30
Pooya Parsa
67750245ab
fix(builder): corretly detect mode of hashed plugins (#5695) 2019-05-11 13:53:37 +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
Pooya Parsa
5ebf1cc78c
fix: avoid using aliases in templates (#5656) 2019-05-06 15:16:04 +04:30
Xin Du (Clark)
9fb720d518 fix(builder): call watch:restart after watch:fileChanged hook (#5620) 2019-04-29 22:50:38 +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
439b914fd0
fix: fail in case of missing core-js dependency (#5342) 2019-03-23 11:18:18 +04:30
Dmitry Molotkov
a867dbd34b fix(builder, vue-app): order of plugin execution based on order in array (#5163) 2019-03-07 23:03:20 +03:30
Xin Du (Clark)
9860eb6a7c
refactor: unify context in webpack module (#5054) 2019-02-18 17:00:51 +00:00
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
Pim
5ec5932bad fix: refactor file watchers (chokidar/linux workaround) (#4950) 2019-02-06 22:16:17 +03:30
Clark Du
858c9eeb5d fix(test): unhandled open handles 2019-02-04 12:39:54 +00:00
Clark Du
fabf1c07eb test: add await for promisable expect 2019-02-04 11:31:24 +00:00
Xin Du (Clark)
43491f6e53
feat(test): unit tests for @nuxt/builder (#4834) 2019-02-04 10:34:04 +00:00