Commit Graph

1561 Commits

Author SHA1 Message Date
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
ousiri
d603b0d418 feat: allow nuxt-child to pass keep-alive props to keep-alive (#4067)
Adds the ability to configure the props of keep-alive on nuxt-child.

## Types of changes
- [ ] 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
In development, I found it impossible to configure the props of keep-alive when using nuxt-child, like ```exclude```. This PR adds a special prop to nuxt-child named keepAliveProps to allow developer to configure it.

```html
<template>
  <div>
    <nuxt-child keep-alive :keep-alive-props="{ exclude: ['modal'] }">
  </div>
</template>
```

## Checklist:
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly. (PR: https://github.com/nuxt/docs/pull/836)
- [ ] I have added tests to cover my changes (if not applicable, please state why)
- [x] All new and existing tests are passing.
2018-10-08 14:27:36 +01:00
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
Alexander Lichter
d69b4b8b12 feat: abstract minify and use value for all modes (#3965)
* feat: abstract minify and use value for all modes

* change name to htmlMinify

* only override htmlMinify with legacy value in generate mode

* Use default options for htmlMinify and add override info to warning

* Remove redundant minification settings

* Override minification settings in generator

* Cleanup and add TODO for nuxt 3

* Improve warning

* set default minify option to "true"

* make tests pass again

* remove the culprit

* replace htmlMinify with html.minify
2018-09-30 18:12:38 +02: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
Pooya Parsa
8f06a187db feat(builder): allow to customize or disable minimizer plugins (#4018)
* feat(builder): allow to customize or disable minimizer plugins

* feat: support optimization.minimize

https://webpack.js.org/configuration/optimization/#optimization-minimize

* fix typos
2018-09-30 18:09:06 +02:00
Clark Du
1bf6385d48 fix: wrong extension for dev mode css file 2018-09-29 21:40:04 +01:00
Lajos Veres
74eb5a6302 * Typofixes - https://github.com/vlajos/misspell-fixer (#4013) 2018-09-29 22:05:20 +02:00
Dmitry Molotkov
4061b6fd87 dont allow to cache error pages (#3962) 2018-09-25 17:16:15 +02:00
Dmitry Molotkov
df148a896e fix: properly serialize undefined in vuex store (#3913)
* allow to serialize undefined variable in vuex store

* test properly

* fix test

* lock
2018-09-25 10:51:07 +02:00
Tatsuyuki Ishi
55a153c7d0 fix: expose loading.throttle as an option (#3953) 2018-09-24 18:30:22 +01:00
Alexander Lichter
054ea7931a refactor: client store code style (#3683) 2018-09-24 02:15:44 +03:30
Dmitry Molotkov
9c3702c819 fix: use options.server values port, host, socket (#3942)
* user options.server values port, host, socket

* fix: Remove default value
2018-09-23 10:49:51 +01:00
Pooya Parsa
b69cabef88 hotfix: use terser-webpack-plugin (#3928)
<!--- 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 (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)


## Description
Webpack requires `uglifyjs-webpack-plugin@1.x`. thus `uglifyjs-webpack-plugin@2.x` may not resolve correctly. Also, the webpack team decided to go with `terser-webpack-plugin` (https://github.com/webpack/webpack/pull/8036).


## 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 passed.
2018-09-20 22:49:43 +01:00
Sébastien Chopin
879ea846a4 fix: Display stack when unhandled error when generating a route 2018-09-19 12:40:05 +02:00
Clark Du
411bb1904e refactor: always use process.client instead of process.browser (#3910) 2018-09-19 13:30:23 +04:30
Clark Du
1c34651baa fix: css-loader 1.0 removed alias (#3741)
BREAKING CHANGE
2018-09-19 13:16:21 +04:30
Tatsuyuki Ishi
d1f6f0dc09 loading: add throttle option to skip progress for fast loads (#3886)
* loading: add throttle option to skip progress for fast loads

* Disable some tests relying on internals
2018-09-18 18:16:27 +02:00
Dmitry Molotkov
5af65527b0 allow plugin in directory with index.js file (#3908)
* allow plugin in directory with index.js file

* add test for plugin in dir

* fix: refacto plugins key
2018-09-18 18:06:55 +02:00
Sébastien Chopin
6975655d78
feat: Overwrite store.registerModule (#3909)
* feat: Overwrite store.registerModule

Make `store.registerModule` works seamlessly with server-side rendering.

* fix: test failure
2018-09-18 17:21:25 +02:00
Pim
226b90d4ae fix: prevent removing project by mistake due to build or generate paths (#3869) 2018-09-14 11:36:44 +04:30
Alexander Lichter
6fc78ea024 Fix legacy gzip warning (#3884)
Fix legacy gzip warning. Thanks to @liam-potter for pointing that out!

Related PR: #3863 

## Types of changes

- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist:
- [x] All new and existing tests passed.
2018-09-13 16:07:34 +01:00
Clark Du
c77fa479f6 feat(webpack, builder): allow extending loader options (#3799) 2018-09-10 12:57:01 +04:30
Alexander Lichter
1e0219543a feat: automatically include env variables starting with NUXT_ENV_ (#3862) 2018-09-09 01:38:25 +04:30
Alexander Lichter
f87992530e feat(webpack/client): minify extracted css assets (#3857) 2018-09-09 01:18:46 +04:30
Alexander Lichter
b74d537cba feat(renderer): make compression middleware customizable (#3863) 2018-09-09 00:48:14 +04:30
Clark Du
14e608bf43 refactor: tiny change on filename escape pattern 2018-09-05 16:13:35 +01:00
Alexander Lichter
6e8a51509c feat(builder, module): allow error layouts to be added through addLayout. closes #3194. (#3834) 2018-09-02 13:52:10 +04:30
Jonas Galvez
72479687d9 feat(core, cli): builtin support of https and unix sockets (#3831)
Co-authored-by: Aurélien Chrétien <aurelien@manager.one>
Co-authored-by: Rémy Sanchez <remy.sanchez@hyperthese.net>
2018-09-02 13:50:25 +04:30
Ahad Birang
bceddf5bcf feat(router): add support for props and alias (#3818) 2018-09-01 09:03:28 +04:30
Indrek Ardel
674e9ed545 feat(builder, webpack): allow loading webp images as assets (#3827) 2018-09-01 08:56:10 +04:30
Clark Du
40aae73d5b
feat: enable runtimeChunk for extracting manifest chunk 2018-08-31 22:47:49 +01:00
Clark Du
b11e9c0e51
feat: upgrade eslint to 5.x (#3494)
- [ ] babel-eslint https://github.com/babel/babel-eslint/issues/664
- [x] eslint-config-standard-jsx https://github.com/standard/eslint-config-standard-jsx/issues/32
- [x] eslint-config-standard to be stable release https://github.com/standard/eslint-config-standard/issues/123
- [x] eslint-plugin-html
- [x] eslint-plugin-import
- [x] eslint-plugin-jest
- [x] eslint-plugin-node
- [x] eslint-plugin-promise
- [x] eslint-plugin-standard https://github.com/standard/eslint-plugin-standard/issues/29
- [x] eslint-plugin-vue https://github.com/vuejs/eslint-plugin-vue/pull/504
- [x] eslint-plugin-react https://github.com/yannickcr/eslint-plugin-react/releases/tag/v7.10.0
2018-08-31 21:34:12 +01:00
Pooya Parsa
f85465386c
feat: move nuxt-legacy and nuxt-start into packages (#3824) 2018-08-31 22:51:41 +04:30
Pooya Parsa
87d303845f chore: remove extra validationError
as @clarkdo mentioned
2018-08-25 21:56:42 +04:30
Jonas Galvez
608b913b8a feat: async validate() (#3797) 2018-08-25 14:12:00 +04:30
Mihal Malostanidis
a2168ae4f9 nit: Make fs more parallel 😂👌 (#3795) 2018-08-24 19:20:57 +01:00
Pim
43f639b88e fix: fallback should always be a string (#3792)
The SPA fallback option should always be a string, if the user configuration was specifed as boolean true it should have been replaced by the default string value (currently 404.html) in lib/common/options.js

Added test on empty string

Added missing test for spa-fallback.html
2018-08-23 19:33:02 +02:00
Clark Du
ba5df53042 refactor: remove unnecessary splitChunks process (#3791) 2018-08-23 15:48:05 +02:00
Clark Du
567dc860c1 feat: new filenames structure (#3789)
* feat: new filenames structure

* refactor: codes format

* refactor: remove [path] in output filename

* refactor: use chunkhash for js files

* refactor: remove normalizeFileName
2018-08-22 23:54:08 +02:00
Sébastien Chopin
22559a838c
code: Update code style, remove else 2018-08-22 20:12:07 +02:00
Clark Du
e8414291b4
refactor: functional filename should be called from webpack (#3788)
@Atinux Improvement for #3787
2018-08-22 16:47:52 +01:00
Alexander Lichter
3e027269c0 feat: merge renderAndGetWindow options (#3761)
* feat: merge renderAndGetWindow options

* fix: typoe

* refactor: remove explicit comparison for truthy value

* fix: setup defaults correctly

* test: add custom params test
2018-08-22 17:14:15 +02:00
Clark Du
3612ecd435 feat: support functional filenames (#3787) 2018-08-22 17:08:51 +02:00
Clark Du
8230354d1b feat: webpack refactor (#3747)
* refactor: use more standard entrypoint config

* refactor: fix dev entry name

* refactor: webpack devtool and optimization
2018-08-22 16:24:47 +02:00
Clark Du
3f7c5f64ed
fix: async fetch and asyncData not trigger ErrorHandler (#3781) 2018-08-22 14:10:43 +01:00
Clark Du
b35126d68c
fix: ie11 loading indicator not centering (#3779) 2018-08-22 14:10:31 +01:00
Clark Du
ef85723fe6
fix: error page rendering before redirect (#3782)
* fix: error page rendering before redirect

* fix: cancel redirect after redirect to external link

* refactor: simplify ERR_REDIRECT

* refactor: simplify ERR_REDIRECT

* refactor: trigger routeChanged when redirect external link
2018-08-22 14:10:18 +01:00
Sébastien Chopin
820f0fae1a
[WIP] Hooks: render:routeContext and render:routeDone (#3773)
* hooks: Add render:routeDone hook

* hooks: Deprecate render:context and add render:routeContext

* refactor: delegate context to routeContext

* test: Add test for render:routeDone hook

* lint: Fix lint issue
2018-08-21 18:35:46 +02:00