1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/packages/next-server
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
..
lib Dedupe only items with unique key (#5800) 2018-12-03 17:28:42 +01:00
server Handle 404 thrown from send (#5779) 2018-11-30 17:09:23 +01:00
asset.js next-server (#5357) 2018-10-02 00:55:31 +02:00
config.js next-server (#5357) 2018-10-02 00:55:31 +02:00
constants.js Fix linter (#5350) 2018-10-20 17:00:01 +02:00
dynamic.js next-server (#5357) 2018-10-02 00:55:31 +02:00
head.js next-server (#5357) 2018-10-02 00:55:31 +02:00
index.js Use correct server path since main was changed 2018-10-02 23:11:01 +02:00
license.md Add license to next-server 2018-11-13 22:57:31 +01:00
next-config.js Add Typescript types for builds functions (#5791) 2018-12-03 14:18:52 +01:00
package.json v7.0.2-canary.34 2018-11-30 19:51:54 +01:00
taskfile-typescript.js Use Typescript to transpile Next.js core files instead of Babel (#5747) 2018-11-28 15:03:02 +01:00
taskfile.js Build / watch .ts core files (#5776) 2018-11-30 13:10:30 +01:00
tsconfig.json Use Typescript to transpile Next.js core files instead of Babel (#5747) 2018-11-28 15:03:02 +01:00