Commit Graph

405 Commits

Author SHA1 Message Date
Pim
b286024dd3 test: add client-only test to basic fixture (#6315)
test: check for no-ssr deprecation warning
2019-08-27 11:25:25 +02:00
Xin Du (Clark)
61ef86e015
test: add test for modern bundle size (#6302) 2019-08-27 00:05:29 +01:00
Xin Du (Clark)
c14bb35aad
test: remove unnecessary generate (#6301) 2019-08-25 23:41:32 +01:00
Xin Du (Clark)
d85d2fb612
Revert "feat: function watchQuery (#6245)" (#6296)
This reverts commit 3c61830a0d.
2019-08-25 10:53:23 +01:00
Xin Du (Clark)
3c61830a0d
feat: function watchQuery (#6245) 2019-08-25 10:12:59 +01:00
Pim
3a125b09d1 test: disable terser/minify by default (#6290) 2019-08-24 18:43:03 +04:30
Sébastien Chopin
09878cd6dc
feat(vue-app): add $nuxt.refresh() (#6194)
* feat(vue-app): add $nuxt.refreshPageData()

* hotifx: lint

* chore: use getMatchedComponentsInstance util

* fix: rename to refreshPage

* fix: rename to refresh

* feat: add $nuxt.$context and handle error

* feat: set $nuxt.context

* hotfix: test
2019-08-07 15:12:02 +02:00
Sébastien Chopin
c6f0f5d954 hotfix: fix config for scrollBehavior test 2019-07-24 18:14:58 +02:00
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
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
Ustun Ozgur
ae9d3519f7 fix(vue-renderer): clone spa meta to prevent cache modification (#5964) 2019-06-28 00:47:43 +04:30
Hyunje Jun
2a66d1952e fix(vue-app): consider watchQuery option in routerViewKey (#5516) 2019-05-09 16:23:59 +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
Damian Stasik
164f73a716 chore(webpack): suggest @nuxtjs/style-resources (#5499) 2019-04-11 14:34:52 +04:30
Xin Du (Clark)
159123feea feat(babel-preset-app): support specifying core-js version (#5411) 2019-03-30 23:53:17 +04:30
Alexander Lichter
1bd4fb14ab chore(postcss): deprecate config support (#5419) 2019-03-30 23:42:12 +04:30
noe132
2d73e8aeba fix(vue-app): prevent mounting page twice on redirect (#5361) 2019-03-29 18:36:35 +04:30
Kevin Marrec
9a3fc8a44e refactor(ts): only generate tsconfig.json if missing (#5356) (#5367)
Co-authored-by: SAWADA Takayoshi <sawadasuiren@gmail.com>
2019-03-29 18:30:49 +04:30
Alexander Lichter
3ac01df488 fix(vue-app): decode router base to support unicode characters (#5297) 2019-03-20 20:16:09 +03:30
Michael Leaney
d03a61b040 fix(vue-app): multiple named views cause invalid syntax (#5262) 2019-03-19 10:25:20 +00:00
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
Pooya Parsa
aabb1f69e7
perf(core): skip esm for node_modules and non .js files (#5220) 2019-03-13 13:54:39 +03:30
Kevin Marrec
92f81e01e7 feat(ts): nuxt configuration typedefs (#4854) 2019-03-04 10:18:40 +03:30
Clark Du
b9391d7ea0 chore: fix eslint warning 2019-02-18 10:44:03 +00:00
Clark Du
5f9b1044ff Merge remote-tracking branch 'origin/2.x' into dev 2019-02-15 13:18:09 +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
Andrey Shertsinger
bcd672f931 fix: generate failure (#5007) 2019-02-13 09:18:41 +00:00
Pooya Parsa
408680046c
fix(vue-app): fix asyncData memory leak on client-side (#4966)
Co-authored-by: Sébastien Chopin <seb@chopin.io>
2019-02-08 20:03:45 +03:30
Pooya Parsa
29297160a1
feat(vue-renderer): improvements (#4722) 2019-02-08 13:35:01 +03:30
Clark Du
e9ba2f97d2 test: add describe.posix and win 2019-01-29 11:29:55 +00:00
Xin Du (Clark)
59be77a2f3
feat: .nuxtignore (#4647) 2019-01-29 09:31:14 +00:00
Kevin Marrec
f18ce4e5d4 fix(ts): better tsconfig.json handling & improve tests (#4856)
* fix(ts): make ts-node register the right `tsconfig.json`

* setup guard & change require in nuxt-ts bin

* improve tests + test guard

* remove typescript-custom fixture

* Move TS unit test from `test/unit` to `packages/typescript/test`

* fix tests
2019-01-28 16:59:13 +03:30
Kevin Marrec
55dc7f4475 fix(ts): keep baseUrl property in generated tsconfig.json (#4843) 2019-01-24 14:14:02 +03:30
Kevin Marrec
2a1ee96a4b feat(ts): auto generate tsconfig.json (#4776)
* Bundle `@types/node` into `nuxt-ts` distribution

* feat(ts): Autogenerated tsconfig.json

* fix(examples): Update typescript examples

* fix(ts): Add `dist` & `tsconfig.json` to `pakage.json` files

* fix: add missing new line at the end of generated `tsconfig.json`

* add suffix if needed to `tsconfig.json` types during package build

* use `readJSON` over `readJSONSync`

* fix indentation in `nuxt-ts/tsconfig.json`

* use writeJson instead of writeFile

* split `nuxt-ts/src` in 2 functions + rootDir parametr + add tests

* add `fs-extra` to dependencies to prevent build warning

* JSON everywhere instead of JSON/Json

* fix: missing call to generateTsConfigIfMissing

* ask confirmation for tsconfig.json generation

* improvement: let compilerOptions.module as default

* improvements

* move from github link to friendly linkable local path

* add resolveJsonModule in default config

Co-Authored-By: kevinmarrec <kevin@marrec.io>

* Move `nuxt-ts` logic to `@nuxt/typescript`

* Upgrade to `ts-node@8.0.1`
2019-01-23 10:53:52 +01:00
pooya parsa
6504e108ea chore(test): reduce use of NUXT_TS 2019-01-21 00:53:03 +03:30
Xin Du (Clark)
b23f5c9b4b feat(server): timing option for Server-Timing header (#4800) 2019-01-19 21:44:54 +03:30
Alexander Lichter
40fbe5ba47 refactor: cleanups and code style improvements (#4788) 2019-01-18 00:48:29 +03:30
Kevin Marrec
dfaffc0183 feat(nuxt-ts): typescript support improvements (#4750) 2019-01-12 23:51:21 +03:30
Sébastien Chopin
3ebd6b707e hotfix(layout): Hot fix for layout middleware 2019-01-10 19:57:32 +01:00
Xin Du (Clark)
f85ac94a87 fix(builder, module): addLayout and nuxt.config precedence over auto-scanned layouts (#4702) 2019-01-09 14:27:46 +03:30
Alexander Lichter
eef2af35e4 fix: no false positives for plugins with index.js (#4714)
resolves #4713 [release]
2019-01-08 22:55:56 +03:30
Xin Du (Clark)
af76e07b56 fix(builder): js layout (#4701)
[release]
2019-01-07 15:44:51 +03:30
Pooya Parsa
ee0096bf59
feat: nuxt-ts (#4658)
[release]
2019-01-04 23:00:28 +03:30
Alexander Lichter
471a32a1a8 feat: add styleExtensions (#4671) 2019-01-03 01:00:19 +03:30
Alexander Lichter
8786ff7317 fix: require serverMiddleware object with path and handler (#4656) 2018-12-30 01:04:47 +03:30
Kevin Marrec
f1377a7f8d feat(ts): provide type checking through fork-ts-checker-webpack-plugin (#4611) 2018-12-23 11:13:51 +03:30
Kevin Marrec
4d5274215a feat(ts): add TSX support (#4613) 2018-12-23 02:12:20 +03:30
Andrey Shertsinger
b1b9e0bcbc feat(vue-app): support named views (#4410)
* support named views for extendRoutes config

* fix lint errors

* fix lint errors 2

* some refactoring

* var rename

* fixture & unit tests

* fix: style

* nuxt-child named view example and test

* nuxt element with named view in layout

* lint
2018-12-20 16:50:22 +01:00
Clark Du
6a4808f576 fix(eslint): amp tags not support pascal case
[skip release]
2018-12-20 13:49:16 +00:00
Ricardo Gobbo de Souza
add80004ba feat(router): custom route name splitter (#4598) 2018-12-20 13:42:42 +01:00
Xin Du (Clark)
e71c4559ff feat: mode for plugins (#4592) 2018-12-20 12:58:10 +03:30
Alexander Lichter
b2eee1772e feat: add store module HMR (#4582)
* feat: add store module HMR

* fix: replace export with window.$nuxt

Thanks to @pi0 for the suggestion :)

* refactor: apply only in dev mode on client side

* test: make store module test more descriptive

* fix: clear modules to apply HMR

* fix: remove console.log

* fix: e2e tests

* refactor: use void
2018-12-19 16:22:00 +01:00
Xin Du (Clark)
e7df65be1a fix: detect plugin without extension (#4579) 2018-12-18 17:49:38 +03:30
Kevin Marrec
75e3df6be5 fix(ts): switch from babel preset to ts-loader (#4563) 2018-12-17 15:21:53 +00:00
Jonas Galvez
669fecc6a3 feat: allow scrollToTop to be explicitly disabled (#4564)
Co-authored-by: James Homer <jameshomer85@gmail.com>
2018-12-16 13:32:39 +03:30
Jonas Galvez
7831e57943 fix: properly serialize head functions (#4558)
#4079
2018-12-15 12:07:31 +03:30
Kevin Marrec
7145c1ab5d feat(builder): optional typescript support (#4557) 2018-12-15 10:25:08 +03:30
Ricardo Gobbo de Souza
99614535b5 feat(vue-app, vue-renderer): support meta headAttrs (#4536) 2018-12-14 17:36:26 +03:30
Alexander Lichter
c60b1945e8 chore: cleanup (#4529) 2018-12-12 10:01:49 +03:30
Alexander Lichter
8e0b5081f2 fix: allow pcss ending for webpack loader (#4530)
[skip ci]
2018-12-12 09:52:43 +03:30
Dmitry Molotkov
33edef2d40 fix(webpack): allow changing devtool with extend (#4515) 2018-12-11 01:04:41 +03:30
Clark Du
e6808c57ef fest: add build.corssorgin (#4472) 2018-12-05 19:51:58 +03:30
Clark Du
5a8e6e4bdf fix: merge route.meta into options.meta (#4479)
[skip release]
2018-12-04 15:49:05 +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
Dmitry Molotkov
a6fed0acbd fix(vue-app): allow passing custom props to error function (#4462)
Resolves #4460.
2018-11-30 22:45:29 +03:30
Alexander Lichter
71136fc9b6 feat: allow lang="postcss" in Vue SFCs (#4417)
* fix: allow postcss lang as tag

* refactor: own postcss rule
2018-11-30 16:23:44 +01:00
Clark Du
701190d796
feat: preload and push modern resources in modern mode (#4362) 2018-11-26 12:09:30 +00:00
Dmitry Molotkov
949785f58e fix(server, vue-app): allow unicode page names (#4402) 2018-11-25 18:22:37 +03:30
Clark Du
52a92fbc48 refactor: use PascalCase for components names (#4396) 2018-11-24 22:19:19 +03:30
Clark Du
70f0dc3825 refactor: spa renderer (#4316) 2018-11-21 16:38:03 +03:30
Alexander Lichter
e0537d54be fix: fall back to default value when publicPath is falsy (#4365)
* test: let tests fail

* fix: add falsy default fallback

* fix(publicPath): force adding trailing slash

* fix: also change _publicPath
2018-11-20 18:12:05 +01:00
Pooya Parsa
27e79be285 fix(builder): add lodash inside templates (#4368) 2018-11-20 09:21:17 +00:00
Clark Du
0db1f26e64
fix(test): wrong route in error-handler-object test (#4363) 2018-11-19 16:06:48 +00:00
Clark Du
660ab37bff fix(tests): make assets in test consistent with build 2018-11-14 23:05:00 +03:30
Dmitry Molotkov
9fbd581557 fix: handle errors that are not error instances (#4321) 2018-11-14 22:47:44 +03:30
Clark Du
853ca4e7d4
refactor: styleLoader and postcss (#4318) 2018-11-12 21:18:50 +00:00
Alexander Lichter
d280bd8d5b chore(config): warn on unknown mode (#4303) 2018-11-11 14:51:53 +03:30
Alexander Lichter
692493f5aa chore: warn when styleResources is used without the community module (#4302)
[skip ci]
2018-11-10 03:29:40 +03:30
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
Alexander Lichter
b3eb4278a5 fix: serialize config head fn shorthand correctly (#4283)
[skip ci]
2018-11-08 02:03:09 +03:30
Pooya Parsa
1dd32d0d21 feat: update to consola 2 (#4247)
* add ~> addReporter

* remove badge

* withScope ~> withTag

* update to consola 2

* update build tests
2018-11-01 04:50:07 +01:00
Clark Du
bed0714fad
feat: modern build (#4231)
* feat: modern build

* refactor: use single module import for lodash

* refactor: add credit comment for modern plugin

* feat: ssr modern build

* fix: not null check for request

* fix: not null check for request.headers

* feat: add modern argument on build command

* refactor: simpilfy filenames for modern

* refactor: use packages/webpack src instead of dist in test

* test: add feature test for modern build
2018-10-31 15:52:35 +00:00
Pooya Parsa
39b558f59c
refactor core into sub-packages (#4202) 2018-10-31 00:12:53 +03:30
Paul Gascou-Vaillancourt
208eba3867 fix(app): Throw error only if value is undefined (#4206) 2018-10-27 20:11:42 +03:30
Clark Du
79eb9c8010
Set up CI with Azure Pipelines (#4190) 2018-10-25 12:33:07 +01:00
Dmitry Molotkov
a3ba6e96ca fix: check styleResources for existence (#4155) 2018-10-25 14:25:05 +03:30
Pim
96bdcaba01 fix(app): lint all templates (#4175) 2018-10-24 17:16:06 +03:30
Clark Du
811234ea02 ci: revert travis windows changes 2018-10-23 10:55:08 +01:00
Clark Du
818c66f567
ci: use travis instead of appveyor (#4168)
<!--- Provide a general summary of your changes in the title above -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [ ] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)


## Description
<!--- Describe your changes in detail -->
<!--- Why is this change required? What problem does it solve? -->
<!--- If it resolves an open issue, please link to the issue here. For example "Resolves: #1337" -->


## Checklist:
<!--- Put an `x` in all the boxes that apply. -->
<!--- If your change requires a documentation PR, please link it appropriately -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly. (PR: #)
- [ ] I have added tests to cover my changes (if not applicable, please state why)
- [ ] All new and existing tests are passing.
2018-10-22 14:02:17 +01:00
Alexander Lichter
f27939d4a7 feat(cli): support async nuxt.config.js (#4021) 2018-10-18 19:27:35 +03:30
Pooya Parsa
9c1e0d1743 feat: migrate nuxt into monorepo (#4051)
Co-authored-by: Clark Du <clark.duxin@gmail.com>
Co-authored-by: Pooya Parsa <pooya@pi0.ir>
2018-10-18 00:58:25 +03:30
Alexander Lichter
411e89e52c test(custom-dirs): fix custom-asset dir test (#4136) 2018-10-17 01:25:56 +03:30
Alexander Lichter
ae2d31ed19 fix(layouts): resolving with nested custom dir (#4135) 2018-10-17 01:25:28 +03:30
Clark Du
521c3778bd
fix: style module with extractCSS not work well (#4093)
* fix: style module with extractCSS not work well

* test: improve extract css test

* fix: exract css name
2018-10-11 22:53:02 +01:00
Clark Du
61407fec1d refactor: config Postcss preset and plugins together (#3927) 2018-10-09 15:56:11 +03:30
Jonas Galvez
a3dd7dad6b feat: configurable global name (#4012)
Co-authored-by: JuliaNeumann <jn.julianeumann@gmail.com>
2018-10-09 15:38:33 +03:30
Felipe Lübe de Bragança
232bc0196f feat: missing pages directory warning (#4054)
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [x] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)


## Description
Resolves #3920 by adding a warning during the build process and a small disclaimer into the default page component.


## Checklist:
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly. (PR: #)
- [x] I have added tests to cover my changes (if not applicable, please state why)
- [x] All new and existing tests are passing.
2018-10-05 13:37:55 +01:00
Clark Du
0393bf781c feat: use understandable file names for analyze mode (#4014)
* feat: use understandable file names for analyze mode

* test: asset name for analyze mode

* refactor: add warning message for analyze mode

* refactor: move analyze warning to builder

* test: analyze warning message
2018-09-30 18:11:20 +02:00