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

15 commits

Author SHA1 Message Date
Tim Neutkens 4051ffcb01 [experimental] Rendering to AMP (#6218)
* Add initial AMP implementation

* Implement experimental feature flag

* Implement feedback from sbenz

* Add next/amp and `useAmp` hook

* Use /:path*/amp instead

* Add canonical

* Add amphtml tag

* Add ampEnabled for rel=“amphtml”

* Remove extra type
2019-02-14 10:22:57 -05:00
Giuseppe 5a4176cffe Invalidate cache for link[preload] in DEV (#6183)
Fixes #5860
2019-02-03 00:12:49 +00:00
Sultan Tarimo 1a416b688e Load ErrorComponent dynamically (#6171)
Closes #6152.

- Only dynamically load /_error.js when an exception occurs.
- Fix websocket “/_error.js” ping oddity.
2019-01-31 20:45:36 +00:00
Tim Neutkens b3045cc7a9
Implement circular JSON err.sh link (#6149)
* Implement circular JSON err.sh link

* Add test for getInitialProps returning circular json

* Make test warn less

* Fix tests

* Add reference to original tests
2019-01-27 16:12:17 +01:00
Connor Davis 419bec0b9b Fix #5674 Append crossOrigin on the client side too, add config option for crossOrigin (#5873)
# Fixes https://github.com/zeit/next.js/issues/5674

This adds config option
```js
// next.config.js
module.exports = {
  crossOrigin: 'anonymous'
}
```
This config option is defined in the webpack Define Plugin at build.
`Head` and `NextScript` now use the config option, if it's not explicitly set on the element.
This value is now passed to Webpack so it can add it to scripts that it loads.
The value is now used in `PageLoader` (on the client) so it can add it to the scripts and links that it loads.
Using `<Head crossOrigin>` or `<NextScript crossOrigin>` is now deprecated.
2018-12-13 01:05:21 +01:00
Tim Neutkens 5e3bf6e537
Convert render.js to typescript (#5869)
* Convert render.js to typescript

* Compile tsx files too

* Remove internal renderErrorToHTML function

* Interopt component result

* requirePage doesn’t need async

* Move out enhancing logic into it’s own function

* Remove buildManifest from renderPage

* Move render into it’s own function

* Change let to const

* Move renderDocument into it’s own function
2018-12-13 01:00:46 +01:00
Tim Neutkens 1c8b09d7ea
Make <Head> children render first, then next/head children, then script preloads/styles (#5852) 2018-12-10 23:40:42 +01:00
Adam Lane 4ce095df89 Add crossOrigin via props to _document Head and NextScript (#5646)
This alternative implementation of https://github.com/zeit/next.js/pull/5150 follows @timneutkens suggestion of using props.

Fixes #5150 
Fixes #3630
2018-11-13 21:36:09 +01:00
Tim Neutkens b65c464d60
Move __NEXT_DATA__ into an application/json script tag (#5584)
* Move __NEXT_DATA__ into a application/json script tag

As outlined by @dav-is here https://github.com/zeit/next.js/pull/4943

* Set __NEXT_DATA__ for backwards compatability
2018-11-03 19:49:09 +01:00
Tim Neutkens a2553bb46e
Remove registration code from initial markup (#5583)
Clears the way a bit for #4943, also makes _document.js less complex, and will allow us to move `__NEXT_DATA__` to a `application/json` script tag.

Also this causes a slightly smaller bundle size 😌
2018-11-03 01:59:54 +01:00
Giuseppe c95abc209b Add with style-sheet example (#5572)
* Remove pathname (#5428)

Same as #5424

* fix typo (#5451)

* Add with style-sheet example

* Fix readme

* Fix typo
2018-11-01 14:05:39 +01:00
Olivier Tassinari e02c0d000a Make IE 11 happy (#5499)
https://sentry.io/share/issue/3bc66ffadcad46a9aae703d5eba1e342/

![capture d ecran 2018-10-22 a 12 04 16](https://user-images.githubusercontent.com/3165635/47287491-b1683a80-d5f2-11e8-8c3f-e409340b880f.png)
2018-10-22 22:31:50 +02:00
Tim Neutkens 965f50beb2
Remove pathname (#5424) 2018-10-10 21:58:15 +02:00
Tim Neutkens 785377d3c3
Add missing dependencies to server (#5369)
- compile default pages correctly into `.next`
- add missing runtime dependencies
2018-10-03 00:08:57 +02:00
Tim Neutkens b1c4f3aec4
Monorepo (#5341)
- Implements Lerna
- Moves all source code into `packages/next`
- Keeps integration tests in the root directory
2018-10-01 01:02:10 +02:00
Renamed from pages/_document.js (Browse further)