1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
Commit graph

2160 commits

Author SHA1 Message Date
Tim Neutkens fbaeba49b6
Add CONFIG_FILE constant, add types for server/config.js (#4529)
This was pulled from #4518, it can already be merged so it's easier to get it in.
2018-06-04 11:38:46 +02:00
Tobi 905da6f92b fixes bug in with-react-intl example: messages and locale variables were undefined on CSR (#4517) 2018-06-01 23:16:11 +02:00
Tim Neutkens 8210686067
Remove deprecated and removed route (#4509) 2018-06-01 13:15:03 +02:00
Davor Santic e153bcbb9a next/head allow duplicates if it has uniq keys (#4121)
resolves #4115

For now, I just added `'article:tag'` so it could be duplicated if we need more we have to extend:
```javascript
const ALLOWED_DUPLICATES = ['article:tag']
```
2018-06-01 13:12:33 +02:00
Tim Neutkens 098f3fd7e9
Rename dist to server to be more consistent (#4506)
Previously we called this directory holding the pages/chunks for server rendering `.next/dist` instead of `.next/server` which is confusing both when looking at it and in the codebase, since there's also `distDir` as a configuration option.

Also made this a constant in `next/constants` so functionality using this can be easily found.
2018-05-31 20:56:04 +02:00
Tim Neutkens 14a7264c27 6.0.4-canary.3 2018-05-31 14:26:11 +02:00
Tim Neutkens 86d01706a6
Remove react-hot-loader (#4500)
Fixes #4494
2018-05-31 11:47:29 +02:00
Tim Neutkens 0f9ea55023 6.0.4-canary.2 2018-05-29 19:42:15 +02:00
Jorge Cuadra 8082eddaef Remove unused import (patch) (#4493) 2018-05-29 19:33:21 +02:00
Tim Neutkens cd1a2fbd91
Add check for added/deleted pages (#4497) 2018-05-29 19:32:16 +02:00
Shu Ding 8cbc0be845 Add with-next-less example (#4492) 2018-05-29 10:37:03 +02:00
Michał Miszczyszyn 669225263d Allow onClick on next/link component's child (#4474)
Allow `onClick` on `next/link` child. This should not be a breaking change, but it's a very useful feature. Real-life use cases include: analytics or closing menu on navigation, and other.

- [x] allow optional `onClick` on `next/link` component's child
- [x] call original `child.props.onClick(e)` before `this.linkClicked(e)`
- [x] add integration tests
- [x] cancel the navigation if `e.defaultPrevented === true`

Fixes #1490
2018-05-27 20:47:02 +02:00
daniel tea 832c494470 fix README typo (#4476)
`idead` to `idea`
2018-05-26 12:11:09 +02:00
Tim Neutkens 1b63a14136 6.0.4-canary.1 2018-05-25 15:35:04 +02:00
Vlad Nicula dbd6f515a0 Fix dynamic import in non webpack env regression #3345 (#4208)
Just in case #3345 was a regression and nextjs should still support non webpack node envs for testing.
2018-05-25 15:29:26 +02:00
Ari Leo Frankel 9b88eef897 fix(bin/next:inspect): Allow node inspect flag to be used (#4160)
This accepts arguments to a node --inspect flag as well as other debugging node flags.

Resolves #4151
2018-05-25 15:10:55 +02:00
andy-viv 2b16d8b2ac added "hashChangeStart" and "hashChangeComplete" events (#4234)
This PR adds events for when there is a hash-only change in the URL. This is needed because `window.addEventListener('hashchange', ...)` does not work with next.js because it is using pushState.
2018-05-25 14:47:58 +02:00
Tim Neutkens 4e8009c107 Add section to the readme about configuring .babelrc 2018-05-25 14:39:37 +02:00
Tim Neutkens e9242705a3
Default query to {}, same behaviour as next export (#4466) 2018-05-25 14:27:18 +02:00
Robin Wieruch 2c3e8d3201 Improve route prefetch docs: add client side imperative code (#4213)
I stumbled into this Issue https://github.com/zeit/next.js/issues/2868 and thought it should be mentioned properly in the documentation.
2018-05-25 14:26:45 +02:00
João Granado 8c6a4ebb1d Fix generated page chunk when libraryTarget is umd (#4205)
This fixes the generated page chunk created by the webpack `pages-plugin` which adds a new line in the beginning of the template, when using `output.libraryTarget` set to be [`umd`](https://webpack.js.org/configuration/output/#module-definition-systems) it returns the module.

Consider the following example, which is the output with the previous implementation:

```js
(function webpackUniversalModuleDefinition(root, factory) {
  if(typeof exports === 'object' && typeof module === 'object')
    module.exports = factory();
  else if(typeof define === 'function' && define.amd)
    define([], factory);
  else if(typeof exports === 'object')
    exports["MyLibrary"] = factory();
  else
    root["MyLibrary"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
  return
    __NEXT_REGISTER_PAGE(...)
});
```

`__NEXT_REGISTER_PAGE()` won't be executed since a `return` statement followed by a new line is the same as having a semicolon inserted right after the `return`. By removing the new line in the beginning of the source concatenation (which I suppose was added for stylistic reasons) this works as expected.
2018-05-25 14:23:44 +02:00
Tim Neutkens 2e9bed098d Remove page-transitions example 2018-05-25 14:19:40 +02:00
Kelly Burke 3f6834dfec sitemap.xml and robots.txt example (#4163)
This example app shows you how to set up sitemap.xml and robots.txt files for proper indexing by search engine bots.
2018-05-25 14:01:32 +02:00
Timothy Vernon a806c16713 Clarify documentation regarding the static folder (#4340) 2018-05-25 13:42:19 +02:00
Shu Ding 4df7e48f94 Add title to default error page (#4383) 2018-05-25 13:35:59 +02:00
Luke Barton cbfdcce32d Update typescript examples to use 1.0.1 of next-typescript (#4472)
* Update typescript examples to use 1.0.1 of next-typescript

* Add .babelrc modifications to upgraded typescript examples
2018-05-25 11:28:35 +02:00
Rob Brennan 0330962618 Improve custom server typescript example v2 (#4470) 2018-05-25 11:03:59 +02:00
Tim Neutkens e6f35421a9 Make sure index of issue template is correct 2018-05-24 15:05:36 +02:00
Tim Neutkens 7193f49eaf Improve issue templates 2018-05-24 14:50:48 +02:00
Dimka Vasilyev 763ddc08a1 added support flex: 1 and and tag support Dimensions (#4460) 2018-05-23 22:47:16 +02:00
Tim Neutkens c461d46efd Fix viewport issue in with-react-native-web 2018-05-23 22:44:22 +02:00
Tim Neutkens 7eabccb5f0 6.0.4-canary.0 2018-05-23 21:11:24 +02:00
Tim Neutkens 8158945b85 Merge branch 'master' into canary 2018-05-23 21:08:56 +02:00
Logan Smyth bb7722f2e2 Use custom Babel loader to avoid using separate Babel copies for loader and loader options (#4417)
* Port Babel logic to new custom babel-loader for config injection.

* Update logic to also support babel.config.js configs.

* Add test for .babelrc

* Make inconsistent test work
2018-05-23 20:35:11 +02:00
Logan Smyth 2495316235 Use custom Babel loader to avoid using separate Babel copies for loader and loader options (#4417)
This resolves the

> .value is not a valid Plugin property

error showing up for people in https://github.com/zeit/next.js/issues/4227

cc @timneutkens
2018-05-23 20:26:57 +02:00
Tim Neutkens f620b8f455
Don’t use chunkhash in development (#4436)
* Don’t use chunkhash in development

* Add test for dynamic imports styling

* Remove pre-load of dynamic page

* Make sure the browser gets closed only once
2018-05-23 14:37:02 +02:00
Jerome Fitzgerald dbe28e1471 📝️Restructure with-material-ui per #4439 (#4444)
Restructure with-material-ui (patch)
2018-05-21 22:14:31 +02:00
Luis Fernando Alvarez D 2ef80a354c Fixed error with the cookie parser in with-apollo-auth (#4445)
Fixes #4442
2018-05-21 21:51:00 +02:00
Tage A. L. K 54e152b11b Minor update to with-apollo-auth (#4426)
Changes
* Update dependencies.
* Remove sending client prop to component on pages.
* Use withApollo correctly on components.
* Use `client.cache.reset()` instead of `prop.client.resetStore()`.

@adamsoffer @timneutkens
2018-05-21 12:13:56 +02:00
James Hegedus 57be892d02 with-firebase-hosting: update to work with next v6 (#4435)
* with-firebase-hosting: update next.js 6, readme about customization

* now next.js 6 is on Babel 7, remove conflicting babel deps
* update Next Server/Cloud Function .babelrc config
* update other deps: Cloud Functions to 1.x.x etc
* rm install-deps script as it is no longer used on deployment (firebase does not upload node_modules)
* make scripts consistent in their wrapping of dirs with \" (escaped double quotes)

* with-firebase-hosting: pin next to "latest" version

* with-firebase-hosting: fix lint errors
2018-05-21 10:28:09 +02:00
Sampson Oliver 35d32b48cc Create with-firebase-hosting-and-typescript example (#4443)
Adds an example based off of @jthegedus work on firebase hosting, compatible with next v6 and using typescript in both the firebase functions and the next app.
2018-05-21 10:25:45 +02:00
Jon Espen Kvisler f2261050a0 Set cache-control public (again) (#4322)
* set cache-control public

* test for Cache-Control header

* set Cache-Control header for commons/main.js
2018-05-19 21:43:18 +02:00
Luis Fernando Alvarez D 915673fcd6 Example updated: with-apollo-auth to Next 6 (#4420) 2018-05-18 10:55:12 +02:00
Luc db545d9bc9 Fix and improve example : with-componentdidcatch (#4400)
* Fix example with-componentdidcatch

* Improve demo in example
: with-componentdidcatch

* Change next dependency to latest

* Revert _app.js
2018-05-18 10:51:11 +02:00
Nathan Walters f5402476cf Add example with next-page-transitions (#4404) 2018-05-17 12:47:19 +02:00
yhirano55 ee1b6d93ce Minor improve with-typescript example [ci skip] (#4402)
* Added license to package.json.
* Modified package name same as dir name.
2018-05-17 12:45:13 +02:00
yhirano55 f6880954c1 Improve files list order in package.json (#4399)
* This is minor refactoring.
* Apply alphabetical order to files list.
2018-05-16 23:56:21 +02:00
Tim Neutkens 13cf9429f7 Remove note about exportPathMap not being supported in development 2018-05-16 21:16:26 +02:00
Tim Neutkens 73a55d7a92 6.0.3 2018-05-16 21:05:58 +02:00
Yuri bced1b1c25 Fixing ios10 issue with webpack-uglify plugin (#4385)
* fix: fixing issue with ios10 and webpack uglify es httebpack-plugin/issues/92

* chore: formatting

* chore: formatting
2018-05-16 14:07:10 +02:00