Commit graph

3421 commits

Author SHA1 Message Date
Andy O'Brien
a7e89eea4d update dependency to fix with-next-page-transitions example (#7049) 2019-04-17 11:18:32 -05:00
Joe Haddad
5499652820 Update AMP example to AMP-first wording 2019-04-17 10:41:20 +09:00
Joe Haddad
3b6aeaae82
Update AMP example (#7056) 2019-04-17 10:34:33 +09:00
JJ Kasper
dbb849e90c
Remove un-needed config from example (#7055) 2019-04-17 10:23:32 +09:00
Joe Haddad
0dbd3b98ec v8.1.0 2019-04-17 10:03:51 +09:00
Connor Davis
588a8f379b
v8.0.5-canary.35 2019-04-16 19:21:04 -05:00
JJ Kasper
fdfbab5d25 Updated handling of AMP page reloading (#7052) 2019-04-16 18:04:41 -05:00
Lucas Machado
abae1734d8 Add a dot to a note in README.md (#7053) 2019-04-16 15:24:13 -05:00
JJ Kasper
75a2c45f6a AMP fix escaped rel (#7045)
if `&amp=1` is used to point to the `amphtml` version of a page it get's escaped causing it to become `&amp=1` this fixes it to stay as `&amp=1`

Closes: #7038
2019-04-16 22:57:17 +09:00
JJ Kasper
59b328b5c3 Remove client bundles for AMP only pages (#7034)
* Remove client bundles for AMP pages
after build since they are not used

* Remove trailing white space

* Use async-sema to limit removing AMP client bundles

* Bring AMP client bundle removing
semaphore concurrency down to 20

* Don't check blocked pages when
deleting AMP client bundles

* Update client bundle removing for AMP pages

* Add error handling for removing client AMP pages

* rethrow error unless ENOENT during
deleting AMP client pages

* Handle error during removing AMP client
pages the same during dev

* Fix throwing instead of rejecting

* Make sure next/config is set before requiring page

* Update error check

* return on reject

* Fix next/config
2019-04-16 22:56:34 +09:00
Tim Neutkens
5054e943d4
Remove experimental flag (#7048) 2019-04-16 22:39:34 +09:00
JJ Kasper
6f9c3aa839 Remove experimental amp config (#7046)
This just removes the need for setting the experimental amp option
2019-04-16 22:09:57 +09:00
Luis Fernando Alvarez D
c48340cd8c
Move next/router to Typescript (#7019)
Added types to next/router
2019-04-15 23:00:48 -05:00
Joe Haddad
8b136a6f9d
Add experimental option to enable terser loader (#7033) 2019-04-15 20:00:01 +09:00
JJ Kasper
cedd9b03f5
v8.0.5-canary.34 2019-04-15 18:50:45 +09:00
JJ Kasper
a79baccadc
Remove noDirtyAmp option (#7032) 2019-04-15 18:49:10 +09:00
JJ Kasper
cf889d6094 Re-add experimental amp config (#7030)
* Update amphtml and canonical rels, put amp behind
experimental flag again, and update checking for amp query

* Fix typescript error

* Re-add flag to next.config.js
2019-04-15 18:26:23 +09:00
JJ Kasper
016c197b7f Add AMP docs to README (#7031)
* Add AMP docs to README

* Update wording

Co-Authored-By: ijjk <jj@jjsweb.site>

* remove extra space

Co-Authored-By: ijjk <jj@jjsweb.site>

* Apply suggestions from code review

Co-Authored-By: ijjk <jj@jjsweb.site>

* Apply suggestions from code review

Co-Authored-By: ijjk <jj@jjsweb.site>
2019-04-15 18:02:59 +09:00
Tim Neutkens
1a53ca7474
Add x-powered-by (#7029)
* Add x-powered-by

* Remove ampEnabled type
2019-04-15 16:48:14 +09:00
Connor Davis
e4ceb903a1
Update README.md 2019-04-15 02:19:37 -05:00
Connor Davis
3363f26a42
Fix missing dash 2019-04-14 20:35:03 -05:00
Javier Alcala
8a326345b9 Enable strict type checking on custom-server-typescript example (#7025) 2019-04-13 19:56:12 +02:00
Frieder Bluemle
9281f4651a Fix GitHub spelling (#7024)
Just a minor typo fix: `Github` -> `GitHub`.
2019-04-13 17:36:07 +02:00
Simon Boudrias
01779429ab Set descriptive displayName on withRouter HOC (#7017)
Not sure when it was introduced, but on the latest Next v8.0.4, there's no descriptive name attached to the component returns from `withRouter`.

This makes it harder to debug and write test cases for components wrapped by `withRouter`.
2019-04-13 13:21:28 +02:00
JJ Kasper
a0473e1f2a
v8.0.5-canary.33 2019-04-12 21:18:11 -05:00
JJ Kasper
09a2fe5c38
Amp page level reload (#6971)
* Only refresh the page when the active
page is updated in AMP mode

* Update handling of page reload to make sure it
still refreshes after a change to another page

* Update checking to be more accurate

* Fix amp-dev not being loaded without
experimental.amp and remove next.config from amp example

* Remove old with-amp example and
rename experimental-amp to with-amp

* update example name

Co-Authored-By: ijjk <jj@jjsweb.site>

* Update comment wording

Co-Authored-By: ijjk <jj@jjsweb.site>

* Use document for reload to keep scroll position

Co-Authored-By: ijjk <jj@jjsweb.site>

* fallback to reloading on error

Co-Authored-By: ijjk <jj@jjsweb.site>

* Update with-amp example readme
2019-04-12 20:54:27 -05:00
JJ Kasper
11016221cd
Make sure AmpContext is available in _document (#7021)
* Make sure AmpContext is available during _document
render and update filtering of script tags in AMP mode

* Update amphtml test to make sure
AmpContext is set for _document render

* Fix stray comma in render.tsx
2019-04-12 19:04:52 -05:00
Alex Parish
5ed51c0049 Update with-graphql-hooks example to exclude SSR library from commons chunk (#7015) 2019-04-11 17:59:42 -05:00
Joe Haddad
dd98bddfb6
v8.0.5-canary.32 2019-04-11 17:11:25 -04:00
Joe Haddad
74cb4f4b7b
Switch to using .next/cache for flying shuttle and terser (#7013) 2019-04-11 17:09:12 -04:00
JJ Kasper
c1eba49289
v8.0.5-canary.31 2019-04-11 14:05:35 -05:00
JJ Kasper
e5111745b5
Replace .amp.js with withAmp(Comp) (#7009)
* Add WithAmp to enable AMP support for
pages instead of .amp.js

* Update handling for exporting AMP

* Fix ampPath in export for / path and
revert isAmp logic to handle right

* Update amphtml test suite

* Add handling for noDirtyAmp during
export and update amp-export test suite

* Update serverless and export-default-map
test suites

* Update require-page tests
2019-04-11 13:59:26 -05:00
Joe Haddad
cc09478a7b Disable terser on .min.js input files (#7008)
This skips re-compressing already minified files.
2019-04-11 17:33:30 +02:00
Joe Haddad
3add5380b6
v8.0.5-canary.30 2019-04-11 10:29:24 -04:00
JJ Kasper
4b9b2fb3a5 Make async-to-promises babel plugin experimental (#7006)
* Make async-to-promises babel plugin experimental

* Move excludes for asyncToPromises behind flag too

* Move other configs behind flag

* Re-add original exclude item
2019-04-11 10:28:57 -04:00
Tim Neutkens
53a336ce5a
Simplify profiling and add serverless target (#7007)
I'm using this to profile right now, so it's probably good to update it.
2019-04-11 16:21:58 +02:00
Juan Olvera
c564c1416a add package.json to example (#7004) 2019-04-11 11:26:18 +02:00
Joe Haddad
b7091104b7
v8.0.5-canary.29 2019-04-10 23:50:44 -04:00
JJ Kasper
9e6708d144 Set custom cacheIdentifier for babel-loader (#6982)
* Set custom cacheIdentifier for babel-
loader that we can increment

* Update to consider external babel config
for cacheIdentifier

* Update to follow babel loader's cacheIdentifier behavior
2019-04-10 23:50:07 -04:00
Joe Haddad
54e9454788
v8.0.5-canary.28 2019-04-10 17:08:51 -04:00
Joe Haddad
510815a7ac
Add Flying Shuttle tests (#7000)
* Add Flying Shuttle tests

* Test second version of server

* Finish first version of tests

* Apply suggestions from code review

Co-Authored-By: Timer <timer150@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Timer <timer150@gmail.com>
2019-04-10 17:08:19 -04:00
JJ Kasper
711d45b698 Use next.config env and packages to calculate hashes (#7001)
* Use next.config env and packages to calculate
hashes for chunk-graph

* Remove example from testing

* remove left over import

* Tweak behavior
2019-04-10 15:19:50 -04:00
Joe Haddad
c2d0a4ef0e
Add Flying Shuttle v1 (#6991)
* Add Flying Shuttle v1

* Add serverless file restoration

* Add another message

* Update test

* Resolve page version last

* Print number of changed pages

* Remove old tests

* Re-add head build ID writing

* Change syntax appearance

* Start adding test components

* Fix react loadable manifest

* Complicate dynamic testing

* Fix first build missing head build id

* Remove flying shuttle tests
2019-04-10 12:41:59 -04:00
Joe Haddad
65fcf351c3
Add new getFileForPage helper to build utils (#6999) 2019-04-10 12:37:30 -04:00
Joe Haddad
a44788fb26
Disable flying shuttle when building for now dev (#6998) 2019-04-10 12:37:13 -04:00
Joe Haddad
a1598b5285
Disable recordsPath for selective page building (#6997)
We cannot rely on `recordsPath` when using selective page mode. All modules must be identified.
2019-04-10 12:23:16 -04:00
Joe Haddad
59fb471bc6
Correct page search order (#6996)
This fixes a case where a user has a page named `next.js.js` and `next.js`.
2019-04-10 12:22:10 -04:00
Joe Haddad
0e68d3c2d9
Adjust all modules identified plugin output (#6995)
This output clashed with the new output style. This output is more inline with existing behavior.
2019-04-10 12:21:14 -04:00
Joe Haddad
c2c634caa6
Use chunkGroup request over rawRequest for loadable manifest (#6993) 2019-04-10 12:06:16 -04:00
Joe Haddad
a863a720ef
Fix Chunk Graph Plugin hashes type (#6994) 2019-04-10 11:59:46 -04:00