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

2825 commits

Author SHA1 Message Date
Hirofumi Wakasugi e463c2a1bb Remove outdated note from with-jest example (#5820) 2018-12-05 11:34:40 +01:00
tylim 81cfea7d90 improve Unstated example so that it can shares state when switching pages (#5822)
* add new example

* update gitignore

* fix lint

* fix linting

* fix linting again

* update unstated example

* remove unsued var

* update readme
2018-12-05 11:32:45 +01:00
Tim Neutkens 84223d39e7 v7.0.2-canary.38 2018-12-04 20:10:53 +01:00
Tim Neutkens 2d5b56a181 Disable usage of esmodules when commonjs is enabled on the preset 2018-12-04 20:10:22 +01:00
Tim Neutkens 29ed67b020
Add test for generateBuildId (#5816)
* Add docs for returning `null` from generateBuildId

* Add test for setting custom buildid

* Fix linting
2018-12-04 16:42:25 +01:00
nodegin cdd5129ef3 Simplify with-absolute-imports example (#5812)
* Delete .babelrc

* Update package.json

* Create next.config.js

* Update next.config.js
2018-12-04 16:38:39 +01:00
Tim Neutkens dada692bd6 v7.0.2-canary.37 2018-12-04 15:28:36 +01:00
Tim Neutkens bd2ad412d3
Bring back module.exports because of backwards compat (#5815) 2018-12-04 15:26:20 +01:00
陈雨童 7ffcb0bf86 Update polyfills (#5814)
#5521
2018-12-04 14:53:24 +01:00
M 38db893a33 fix typo (#5813) 2018-12-04 12:48:15 +01:00
Jeroen Knoops fcae74c49d Removes some quotes in with-emotion example (#5802)
There were some strange quotes and misaligned html on the page in the `with-emotion` example.
2018-12-04 11:55:33 +01:00
Tim Neutkens dd3b5bf81d v7.0.2-canary.36 2018-12-04 11:04:21 +01:00
Tim Neutkens d11a3aa34e
Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue

* Remove unneeded extra option

* Remove isomorphic-fetch
2018-12-04 10:59:12 +01:00
Peter Halasz 01b34bb784 Format no-document-title description (#5803) 2018-12-03 23:04:18 +01:00
Matheus Fernandes 977bf8d9eb Zeit -> ZEIT (#5804) 2018-12-03 23:01:23 +01:00
Tim Neutkens 082db2877d v7.0.2-canary.35 2018-12-03 19:50:59 +01:00
Tim Neutkens 2d31404d07 Add license to the root directory 2018-12-03 19:49:18 +01:00
Jess Telford 2f3b0c4de6 MDX example app (#5796)
Example deployment on now v2: https://nextjswith-mdxexample-r8b1vzjbn.now.sh
2018-12-03 19:41:12 +01:00
Tim Neutkens f79230db33
Change module resolution extensions (#5801)
Same as https://github.com/zeit/ncc/pull/80
2018-12-03 19:36:24 +01:00
Matthew Lilley cefbb84230 Fix for locale.split is not a function. (#5794)
* Fix for locale.split is not a function.

Following from https://github.com/zeit/next.js/pull/5488

- Renamed languages to supportedLanguages
- Firstly, accept languages based on supportedLanguages
- And finally, accept a single language, if it returns false, the default of 'en' is used.

I looked at the navigator library, which is used by 'accept', this should be a more solid solution, since we can now know that `const locale` is always a string.

// Before (Sometimes returns an array as `const local`)
const locale = accept.language(languages) || 'en' 

// After (Always returns a string)
const locale = accept.language(accept.languages(supportedLanguages)) || 'en';

* Update server.js

Update variable name.
2018-12-03 09:10:31 -08:00
Tim Neutkens 9890e06907
Dedupe only items with unique key (#5800)
Fixes #3705
Fixes #4656

- No longer automatically dedupe certain tags. Only the ones we know are *never* going to be duplicate like charSet, title etc.
- Fix `key=""` behavior, making sure that if a unique key is provided tags are deduped based on that.

For example:

```jsx
<meta property='fb:pages' content='one'>
<meta property='fb:pages' content='two'>
```

Would currently cause

```jsx
<meta property='fb:pages' content='two'>
```

### After this change:

```jsx
<meta property='fb:pages' content='one'>
<meta property='fb:pages' content='two'>
```

Then if you use next/head multiple times / want to be able to override:

```jsx
<meta property='fb:pages' content='one' key="not-unique-key">
<meta property='fb:pages' content='two' key="not-unique-key">
```

Would cause:

```jsx
<meta property='fb:pages' content='two'>
```

As `key` gets deduped correctly after this PR, similar to how React itself works.
2018-12-03 17:28:42 +01:00
Tim Neutkens 58f5dd297a
Add Typescript types for builds functions (#5791) 2018-12-03 14:18:52 +01:00
Tim Neutkens a9cf735f50
Convert babel plugins to typescript (#5789)
Slowly moving files over 💯
2018-12-02 18:30:00 +01:00
Luc e43d21fdf0 remove occurence of deprecated url prop in readme (#5786) 2018-12-01 21:11:06 +01:00
Tim Neutkens a66e1c0d7c v7.0.2-canary.34 2018-11-30 19:51:54 +01:00
Tim Neutkens e5002234d0
Transpile imports if module has module.exports (#5780)
Fixes #5778
Fixes #3650
2018-11-30 17:56:07 +01:00
Tim Neutkens 633dd87b18
Handle 404 thrown from send (#5779) 2018-11-30 17:09:23 +01:00
Tim Neutkens 4322bb13dd
Build / watch .ts core files (#5776) 2018-11-30 13:10:30 +01:00
Steven Bell af1d10c941 update with-emotion example to emotion 10 (#5770) 2018-11-29 20:12:25 +01:00
Tim Neutkens f1fe237ba8 v7.0.2-canary.33 2018-11-29 19:33:20 +01:00
Tim Neutkens 86d144b639 Temporarily disable sass test 2018-11-29 19:23:00 +01:00
Tim Neutkens 1c64e59564 v7.0.2-canary.32 2018-11-29 12:36:48 +01:00
Tim Neutkens 55e89e759a
Fix polyfill for ie11 (#5763)
* Fix polyfill for ie11

* Use esmodules only when using webpack
2018-11-29 12:36:03 +01:00
Jan Mühlemann 09a8960f1a Add next-i18next as the solution to integrate i18next into next.js (#5761)
* replace all i18next related examples with the recommended next-i18next module

* update readme
2018-11-28 20:39:54 +01:00
garnerp c5630d3bc5 Fix with-babel-macros by upgrading packages (#5762)
Added next/babel in .babelrc
Upgraded babel-macros to babel-plugin-macros
Upgraded preval.macro
2018-11-28 20:34:46 +01:00
Tim Neutkens c1037949fd v7.0.2-canary.31 2018-11-28 17:55:37 +01:00
Tim Neutkens fb92fdef54
Make sure const/async is transpiled (#5760)
* Make sure const/async is transpiled

* Use babel common compilation instead
2018-11-28 17:53:49 +01:00
Ståle Pettersen 4594b7cb07 Remove secret from 'publicRuntimeConfig' example (#5759) 2018-11-28 15:29:41 +01:00
Tim Neutkens af893bf740 v7.0.2-canary.30 2018-11-28 15:12:43 +01:00
Tim Neutkens 15bb1c5e79
Use Typescript to transpile Next.js core files instead of Babel (#5747)
- Replaces taskr-babel with taskr-typescript for the `next` package
- Makes sure Node 8+ is used, no unneeded transpilation
- Compile Next.js client side files through babel the same way pages are
- Compile Next.js client side files to esmodules, not commonjs, so that tree shaking works.
- Move error-debug.js out of next-server as it's only used/require in development
- Drop ansi-html as dependency from next-server
- Make next/link esmodule (for tree-shaking)
- Make next/router esmodule (for tree-shaking)
- add typescript compilation to next-server
- Remove last remains of Flow
- Move hoist-non-react-statics to next, out of next-server
- Move htmlescape to next, out of next-server
- Remove runtime-corejs2 from next-server
2018-11-28 15:03:02 +01:00
Tim Neutkens c801a96631 v7.0.2-canary.29 2018-11-27 22:21:00 +01:00
Tim Neutkens 08e3396574
Fix graphql issue with lambdas flag (#5755)
Fixes https://spectrum.chat/?t=604f6aa6-23f2-4358-8b0b-14e5810178dc
2018-11-27 22:20:13 +01:00
Tim Neutkens 818cf8e77a v7.0.2-canary.28 2018-11-27 12:39:07 +01:00
Anderson Leite 48d3ae2dd6 Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred"
2018-11-27 12:28:34 +01:00
Tim Neutkens 9d30e411b5
Fallback to <script> loading behavior when preload is not supported (#5744)
Based on https://github.com/zeit/next.js/pull/5737#discussion_r236059295

This will cause a warning in chrome/safari after 3s
2018-11-26 23:58:40 +01:00
Isaac Hinman c178e98a67 Move with-i18next example to external repo (#5743) 2018-11-25 19:25:33 +01:00
Voon Ming Hann e3c7d3fdb8 firebase cloud messaging example (#5689) 2018-11-25 16:37:34 +01:00
Ting-Hsiang Hsu 21d5aebd53 feat(example): add react-relay-network-modern example (#5349)
In this example, we can:
- `QueryRenderer` SSR
- caching the data
- use the feature of `react-relay-network-modern` which is the powerful tool for `relay-modern`

I copy the example `with-relay-modern`, but I just modified the code. Some detail are not modified.
If you think this example is needed, I will fix those. Otherwise, close this **PR** to let me know this example is not needed.
2018-11-25 15:14:36 +01:00
Obed Marquez Parlapiano b63487c331 Update with-firebase-auth example (#5742)
- The with-firebase-auth example won't run unless a database with proper rules is created first. 
- Add a small error callback to addDbListener to help with debugging if someone's database connection doesn't work.
2018-11-25 14:57:15 +01:00
Anderson Leite d6d9dd1e42 Tests for "ssr: true" on dynamic pages (#5728)
**What's this PR?**
Based on the feedback on [this PR](https://github.com/zeit/next.js/pull/5722) @timneutkens asked me to create a test for `ssr: true`

**What's it do?**

- adds a test for setting `ssr: true` - /basic
- adds a test for setting `ssr: true` - /production
2018-11-25 01:11:25 +01:00