Commit graph

1837 commits

Author SHA1 Message Date
Joe Haddad
57ec121d48
Rename Build SPR to SSG (#10114) 2020-01-15 15:57:07 -05:00
JJ Kasper
563f3c084c
Honor exportTrailingSlash for default 404 (#10109) 2020-01-15 14:18:31 -06:00
Joe Haddad
b595dd6af1
v9.2.0 2020-01-15 11:38:15 -05:00
Joe Haddad
6b21b45edf
v9.1.8-canary.17 2020-01-15 11:20:38 -05:00
Luis Alvarez D
a15ccbc0fe Update readme to link to the new docs (#10096)
* Updated next readme

* Delete README_old.md

* Update README.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-01-15 11:25:18 +01:00
Prateek Bhatnagar
552f3b4302 fixing observing paint types in safari bug (#10076)
* fixing observing paint types in safari bug

* using try catch for performanceObserver fallback

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 23:16:38 -05:00
Joe Haddad
3aa6edb618
v9.1.8-canary.16 2020-01-14 23:03:19 -05:00
Joe Haddad
41195b69e1
Fix Legacy CSS with Granular Chunks (#10101) 2020-01-14 23:02:49 -05:00
JJ Kasper
fff897d766 Apply some renames for SSG related code (#10099)
* Rename some spr related stuff to ssg

* Update packages/next/lib/constants.ts

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 20:22:15 -05:00
Joe Haddad
6d2d675bb8
v9.1.8-canary.15 2020-01-14 15:13:18 -05:00
Tomas Cerskus
ce2714de73 Fix reading Component.__N_SSG (#10037)
* Fix error when reading Component.__NEXT_SPR in packages/next/client/index.js

* Use the .? optional chaining operator

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

* Update index.js

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 15:06:26 -05:00
Joe Haddad
d9d9545f30
Error on CSS in Custom Document (#10091) 2020-01-14 14:53:42 -05:00
Joe Haddad
2d76c4a9bb
Replace __NEXT_SPR with __N_SSG Identifier (#10090) 2020-01-14 14:40:20 -05:00
Houssein Djirdeh
01699c6ac3 removes performance measures and marks for concurrent and blocking modes (#10088)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 14:17:18 -05:00
Joe Haddad
5494f0c500
v9.1.8-canary.14 2020-01-14 13:40:02 -05:00
JJ Kasper
84264f8179 Add required permanent: boolean field to redirect (#10044)
* Add permanent field for redirects

* Update printing redirect status code

* Don't add permanent to routes-manifest

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 13:28:48 -05:00
Janicklas Ralph
415a9b6d1e Fix modern + granularChunk hydration failing (#9727)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy

* Bumping native-url version, includes fix for IE11

* Update lock file

* Updating native-url, fixes issue on IE11

* Fix sourcemap being added in document

* Adding Router as an app level dep. Fixes Router not being added as a dep to pages without Link when granularChunks is enabled

* Fix typescript error

* Fix modern + granularChunks hydration failing

* Fix TS error

* Update native-url version

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-14 13:10:16 -05:00
James George
7f25fb6cf6 chore: Minor code refactor to eliminate redundant code (#10051) 2020-01-14 10:40:45 +01:00
Joe Haddad
9f6fdb95f2
Ignore CSS Ordering Warnings (#10068) 2020-01-13 07:48:24 -05:00
Joe Haddad
240b41cce3
v9.1.8-canary.13 2020-01-10 17:13:39 -05:00
Christopher Snyder
c294ad0a53 Fix missing quotes around in operator check for PerformanceObserver (#10018)
* Fix missing quotes around `in` operator check for PerformanceObserver

* Always call `getEntriesByType()` even if performance observer is supported.

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-10 17:00:32 -05:00
Joe Haddad
3dc4a6873c
v9.1.8-canary.12 2020-01-10 16:08:55 -05:00
Joe Haddad
a7a924f2a4 Disable New CSS For Sass, Less, and Stylus (#10043) 2020-01-10 15:07:06 -06:00
JJ Kasper
5c6a20dbfc Add refresh header for 308 redirect for IE11 compatibility (#10042) 2020-01-10 15:54:23 -05:00
Joe Haddad
243c038222
docs(errors): CSS Modules Imported by a Dependency (#10034) 2020-01-10 11:45:01 -05:00
JJ Kasper
14ca20d0d5 Add warning when API resolves without the request being finished (#9999)
* Add error when API resolves without the request being finished

* Update to only show warning in development instead

* Update packages/next/next-server/server/api-utils.ts

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-10 10:56:20 -05:00
Joe Haddad
dd020fb888
docs(errors): CSS Imported by a Dependency (#10032) 2020-01-10 10:40:28 -05:00
Joe Haddad
fa81a4df83 Add Links to Global CSS Error (#10031)
* Add Links to Global CSS Error

* Add Example
2020-01-10 09:31:38 -06:00
Joe Haddad
12665cb0b2
v9.1.8-canary.11 2020-01-09 21:56:44 -05:00
JJ Kasper
3e923d059d Fix public/ file name encoding (#10022)
* Update serving of files from public folder to handle special chars

* Update tests and match handling in dev mode

* Fix windows public file handling

* Remove colon test to make git on windows happy

* Remove un-used files

* Add missing await
2020-01-09 21:56:05 -05:00
Joe Haddad
b90289fc4f
v9.1.8-canary.10 2020-01-09 20:17:45 -05:00
Joe Haddad
5d3303f50a
Ensure Build Output Does Not Contain <buildId> (#10021)
* Ensure Build Output Does Not Contain `<buildId>`

* use posix join for common file
2020-01-09 17:31:03 -05:00
Joe Haddad
de0b0e8712
v9.1.8-canary.9 2020-01-09 17:09:23 -05:00
Joe Haddad
345efa3ea8 Keep Chunk Hash in Build Output (#10020) 2020-01-09 15:44:47 -06:00
Joe Haddad
dd6406ace2
Add Back Comments (#10019)
* Add Back Comments

* remove property all together

* Replace all instances
2020-01-09 16:33:22 -05:00
Joe Haddad
af82f322e5
Enable New CSS Support by Default (#9927)
* Enable New CSS Support by Default

* Adjust configs

* Fix invisible AMP body

* Fix AMP validation warning

* test fix

* Use expression that won't be eliminated by babel
2020-01-09 15:31:28 -05:00
Joe Haddad
d0957e3001
v9.1.8-canary.8 2020-01-09 13:52:01 -05:00
Joe Haddad
0fd15ad6ba
Separate Self Size and First Load Size (#10014)
* Separate Self Size and First Load Size

* Tweak tests
2020-01-09 13:49:52 -05:00
Joe Haddad
e5c1f94688
v9.1.8-canary.7 2020-01-08 11:50:09 -05:00
Jan Potoms
2112e81ae4 Don't prepend a slash on empty path (#9973)
Fixes https://github.com/zeit/next.js/issues/9678

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-08 11:45:17 -05:00
Afzal Sayed
58b2d9e208 Use optional chaining syntax (#9975)
* Use optional chaining syntax

* Changes as per review

* Bug fix
2020-01-08 11:30:53 -05:00
Joe Haddad
7a6f056192
v9.1.8-canary.6 2020-01-08 10:33:28 -05:00
Joe Haddad
1c6f0874ce Test That Custom Properties Are Not Compiled (#9984)
* Fix Browserslist Loading

* Fix Browserslist Integration for CSS

* Add missing file

* Test That Custom Properties Are Not Compiled

* Disable custom properties transform
2020-01-08 12:06:16 +01:00
Luis Alvarez D
18d8c90c3f Updated docs for pathname (#9964)
* Updated docs for pathname

* Apply suggestions from Tim

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

* Removed trailing dots

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-01-08 11:56:17 +01:00
Joe Haddad
3c8fff354b
Simplify <Link> Prefetch Deduping (#9987)
* Simplify `<Link>` Prefetch Deduping

* Fix test

* Update test/integration/preload-viewport/test/index.test.js

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

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-01-07 18:25:44 -05:00
Joe Haddad
c387986b6a
v9.1.8-canary.5 2020-01-07 17:12:54 -05:00
Joe Haddad
8686fca6a4
Fix Browserslist Integration for CSS (#9985)
* Fix Browserslist Loading

* Fix Browserslist Integration for CSS

* Add missing file
2020-01-07 16:59:58 -05:00
Joe Haddad
c6e6d98f9a
v9.1.8-canary.4 2020-01-06 16:41:14 -05:00
Joe Haddad
c512b04ed9
v9.1.8-canary.3 2020-01-06 15:52:33 -05:00
Joe Haddad
2757826cf7
Use <script defer> by default, matching <script type=module> (#9966)
* Use `<script defer>` by default, matching `<script module>` behavior

* remove old test
2020-01-06 14:55:08 -05:00
Felix Mosheev
dea80b8565 Allow libs that ends with next/dist such as i18next, next-i18next, react-i18next to be external (#9956)
fixes #9022

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-06 14:27:36 -05:00
JJ Kasper
501587ab2c
v9.1.8-canary.2 2020-01-06 11:27:13 -06:00
Joe Haddad
a50a0577d2 Fix Tests (#9963) 2020-01-06 10:43:26 -06:00
Brian Mathews
5a2182e62e Add assetPrefix when fetching script and style dependencies (#9933)
* Add assetPrefix when fetching script and style dependencies for granularChunks

* Lint

* Fix assetPrefix usage with granularChunks

* Add tests for granularChunks with assetPrefix

* Cleanup
2020-01-06 10:55:39 -05:00
Tim Neutkens
32ec4f6913 Allow for shortened names for certain items (#9949)
* Use smaller name as it's not shortened

* Remove export as it's not used and it'll be shortened

* Update size

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-04 15:53:33 -05:00
JJ Kasper
1db6764c52
v9.1.8-canary.1 2020-01-04 12:14:26 -06:00
Tim Neutkens
7e817cab04 Remove rewriteUrlForNextExport from bundles when option is not enabled (#9946)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-04 12:16:57 -05:00
Tim Neutkens
72a0c5578e Remove async from void functions in page-loader (#9948)
* Remove async from void functions in page-loader

* Fix void return

* Update page-loader.js

* Update index.test.js
2020-01-04 11:58:32 -05:00
Tim Neutkens
1fd57d22d5
Remove experiment (#9945)
* Remove experiment

* Add back ssr-prepass for serverless test

* Update size as they both decreased

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-01-04 17:40:18 +01:00
Tim Neutkens
8898b853e6
Don't bundle prop-types to then tree shake it (#9944) 2020-01-04 14:12:11 +01:00
Joe Haddad
8ebc5461e4
v9.1.8-canary.0 2020-01-03 16:31:32 -05:00
Joe Haddad
9261b82a82
Enable New Chunking Behavior (#9731)
* Enable New Chunking Behavior

* fix tst

* Increase sizes in test

* add another test

* Fix preloading order

* Replace commons with framework
2020-01-03 15:55:10 -05:00
JJ Kasper
ae78e8f5be Fix get(Static|Initial)Props re-running when updating query (#9907)
* Add failing test for re-calling getStaticProps after updating query

* Fix get(Static|Initial)Props re-running when updating query

* Update invalid export tests

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-03 15:36:24 -05:00
Joe Haddad
8e2ff2cd1f
v9.1.7 2020-01-03 14:54:11 -05:00
Joe Haddad
a701072fc6
v9.1.7-canary.16 2020-01-03 13:19:52 -05:00
Joe Haddad
878ee56bb9
Fix New CSS Support Media Paths (#9916)
* Fix CSS Media Paths

* update test

* Use absolute path

* Add new tests

* fix import
2020-01-03 12:45:04 -05:00
Igor Crispim Diniz
2f1b15c674 Fix _app global css import order (#9836)
* fix root components import order

* import order tests

* chunks attachment order tests
2020-01-03 18:00:06 +01:00
Tim Neutkens
3a797f1a38 v9.1.7-canary.15 2020-01-03 17:14:01 +01:00
Tim Neutkens
c8799f9e7d
Enable catchAllRouting by default (#9922) 2020-01-03 16:51:26 +01:00
Tim Neutkens
ed1424197c v9.1.7-canary.14 2020-01-03 11:46:14 +01:00
JJ Kasper
6e1762a751 Remove extra logging from on-demand-entries (#9909)
* Remove extra logging from on-demand-entries

* Update on-demand-entry-handler.ts

* Update on-demand-entry-handler.ts

* Update on-demand-entry-handler.ts

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-01-03 11:43:36 +01:00
Joe Haddad
aa04318773
v9.1.7-canary.13 2020-01-02 18:48:56 -05:00
Joe Haddad
00179adcaa
Fix User Error in Async API Endpoint (#9911) 2020-01-02 18:47:39 -05:00
JJ Kasper
ad7bb4e352 Add headers support to custom-routes (#9879)
* Add headers support to custom-routes

* Update manifest version test

* Add headers field for dynamic routes test

* Update test
2020-01-01 13:47:58 +01:00
JJ Kasper
7bf6aca7be
v9.1.7-canary.12 2019-12-31 16:09:59 -06:00
JJ Kasper
8132524d24
Revert version bump for routes-manifest (#9896) 2019-12-31 16:06:09 -06:00
JJ Kasper
5c72663c87
Ensure params in query are updated for custom-routes (#9797)
* Add handling for params in destination query

* Update describe name
2019-12-31 14:13:55 -06:00
Joe Haddad
4f0c74c543 Fix Potential Duplication of Page Loading (#9894) 2019-12-31 12:19:39 -06:00
JJ Kasper
b6d513146e
v9.1.7-canary.11 2019-12-30 17:54:51 -06:00
Joe Haddad
8247f19f10 Defer Loading CSS Configuration (#9889) 2019-12-30 17:53:35 -06:00
Joe Haddad
b0892eff1d
v9.1.7-canary.10 2019-12-30 17:57:32 -05:00
Joe Haddad
0957ed6f32
Use Cached SSG Data on History Navigation (#9887)
* Use Cached SSG Data on History Navigation

* Add data caching test

* Create a static data cache

* Eliminate an if / return

* Do not cache in dev mode

* bump

* bump

* bump

* bump

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2019-12-30 17:57:06 -05:00
JJ Kasper
39ccd8ffe8 Add error for rewrite to auto-exported dynamic page (#9816)
* Add error for rewrite to auto-exported dynamic page

* Update packages/next/next-server/server/render.tsx

Co-authored-by: Joe Haddad <timer150@gmail.com>
2019-12-30 14:06:38 -05:00
Joe Haddad
078b2a5e49 Refactor SSG Data Fetching (#9884) 2019-12-30 12:40:23 -06:00
JJ Kasper
cad5a84e51
v9.1.7-canary.9 2019-12-30 09:44:45 -06:00
Tim Neutkens
df97f2d93c
Update native-url for peerdep (#9882)
Fixes https://github.com/zeit/next.js/issues/9687#issuecomment-569632942
2019-12-30 11:30:50 +01:00
JJ Kasper
148084006a Add basePath to routes-manifest (#9875)
* Add basePath to routes-manifest

* Bump routes-manifest version

* Update tests for version bump
2019-12-30 11:23:26 +01:00
Tim Neutkens
ae567bfc29 v9.1.7-canary.8 2019-12-29 20:05:27 +01:00
Tim Neutkens
86808bbce2
Add basePath support (#9872)
* Add basePath support

* Add tests including copy of HMR tests

* Add production tests

* Add tests for serverless target

* Add missing quotes
2019-12-29 20:03:12 +01:00
Joe Haddad
2d0ad7d40c
Refactor Router#getInitialProps (#9853)
This PR refactors `Router#getInitialProps` in preparation for dedicated SSG fetching logic. This PR should have no functional change -- please review it carefully.
2019-12-29 14:01:46 -05:00
Joe Haddad
be3b5b7c5f Register Created Bindings (#9864) 2019-12-28 16:01:01 -06:00
Joe Haddad
f1f464b366
v9.1.7-canary.7 2019-12-27 15:27:33 -05:00
Joe Haddad
edf63e597d Expose CSS Issuer When Error (#9850)
* Expose CSS Issuer When Error
This introduces a friendlier error for invalid CSS imports by telling you the offending file.

---

Fixes #9847

* fix test matches
2019-12-27 13:56:33 -06:00
Joe Haddad
14b18da055
Special Global CSS Error within node_modules (#9849) 2019-12-27 13:35:37 -05:00
Joe Haddad
5bd58d5aca
v9.1.7-canary.6 2019-12-27 13:23:14 -05:00
Joe Haddad
a56d9a918c Do Not Run File Loader on Server (#9843) 2019-12-26 16:17:37 -06:00
Joe Haddad
6b50b1322b Allow Boolean API Response (#9842) 2019-12-26 15:38:12 -06:00
Joe Haddad
ec440d4b7b
Allow Empty API Body (#9838) 2019-12-26 14:23:06 -05:00
Joe Haddad
9e680b4cb2
v9.1.7-canary.5 2019-12-26 12:06:27 -05:00
Joe Haddad
69a34dd778
Fix IE11 Prefetching (#9823) 2019-12-24 15:40:06 -05:00
Tim Neutkens
3e05139dc3 v9.1.7-canary.4 2019-12-24 16:59:36 +01:00
Jason Miller
93c745c2b7 [Experimental] Move Babel transpile into a cached thread pool (#9331)
* Add cached off-thread babel transpile

* Update webpack-config.ts

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2019-12-24 16:58:50 +01:00
Joe Haddad
632e40f266
Optimize Prefetching (#9818)
* Optimize Prefetching

* fix css client nav test

* fix preload viewport test

* fix production test

* patch tests more

* Make page loader wait on prefetch

* no unhandled rejection

* Save some bytes
2019-12-24 10:07:44 -05:00
Joe Haddad
86025c84eb
v9.1.7-canary.3 2019-12-23 16:22:42 -05:00
JJ Kasper
b9865ba32e Add checking filesystem after each rewrite (#9568)
* Add check: true behavior to custom routes

* Update adding dev routes

* Add checking of pages and dynamic routes for check: true

* Fix hasPage binding

* Add tests for check: true behavior

* Update regex checking

* Make changes based on review

* Update to handle rewrites in serverless loader

* Update to not change req.url

* Make sure to always parse dynamic route params

* Export all of pathToRegexp from path-match

Co-authored-by: Joe Haddad <timer150@gmail.com>
2019-12-23 16:20:17 -05:00
Joe Haddad
5c3f9ba745 Add Specific Error for Function in PostCSS Config (#9815) 2019-12-23 14:43:38 -06:00
JJ Kasper
17fe6e3221
v9.1.7-canary.2 2019-12-20 15:58:59 -06:00
JJ Kasper
1ec7716fe6
Prevent re-observing for an already prefetched page (#9644)
* Prevent re-observing for an already prefetched page

* Update size-limit test

* Move prefetched setting

* Remove extra prefetched setting
2019-12-20 15:30:58 -06:00
JJ Kasper
dcab416d6d
v9.1.7-canary.1 2019-12-20 12:32:35 -06:00
JJ Kasper
1de765e452
Update to close SSE connection before unload (#9798) 2019-12-20 12:01:22 -06:00
JJ Kasper
163f607160
Add parsing of route source during checking (#9787)
* Add parsing of route during checking

* Update err.sh
2019-12-19 10:48:34 -06:00
Lachlan Campbell
8e1046d94a Fix error message typo: "Keys that need moved" (#9772) 2019-12-17 14:25:02 -10:00
JJ Kasper
ac9f1665ef
v9.1.7-canary.0 2019-12-17 11:13:24 -06:00
JJ Kasper
463d30ec9d
Add handling for external redirects (#9764) 2019-12-17 11:02:39 -06:00
Tim Neutkens
dbc0853ed4 v9.1.6 2019-12-17 10:49:31 +01:00
JJ Kasper
bdedf2c057
v9.1.6-canary.11 2019-12-16 11:46:59 -06:00
JJ Kasper
fd95d6c8bc
Fix AMP HMR for child components (#9736) 2019-12-16 11:45:48 -06:00
Tim Neutkens
2ba056aa20
Add check for invalid assetPrefix (#9759)
* Add check for invalid assetPrefix

* Update test/integration/invalid-config-values/test/index.test.js

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-12-16 16:07:03 +01:00
JJ Kasper
a32af59e93 Fix Shared Sizes Missing Commons (#9752)
* Fix shared sizes missing commons

* Add tests
2019-12-14 12:23:04 -07:00
Taylor Bryant
eee4efd0e8 Fix typo (change imperatively to imperative) (#9750) 2019-12-14 11:56:33 -07:00
Tim Neutkens
dc51a705c1 v9.1.6-canary.10 2019-12-14 11:22:34 +01:00
Tim Neutkens
950d67b721
Add experiment for prefetching (#9747) 2019-12-14 11:21:48 +01:00
Joe Haddad
838aec8fa0
v9.1.6-canary.9 2019-12-14 02:00:56 -05:00
Joe Haddad
845dc0827d Compute Gzip Sizes of Files (#9745) 2019-12-14 00:39:59 -06:00
Joe Haddad
9622c6559f
v9.1.6-canary.8 2019-12-14 01:32:06 -05:00
JJ Kasper
6fcb6230d2 Add support for exporting from serverless build (#9744)
* Add support for exporting from serverless build

* Add more tests

* Update syntax

* Dont add dynamic params in worker

* Update amphtml rel for serverless tests

* Update tests again

* Update dynamic params populating

* Fix params parsing

* Pass params separately
2019-12-14 01:31:48 -05:00
JJ Kasper
a12030b266
v9.1.6-canary.7 2019-12-13 14:43:13 -06:00
Joe Haddad
32cb5e105a Disable CSS Support When Manually Configured (#9735)
* Disable CSS Support When Manually Configured

* upgrade TS

* adjust yarn lock

* Remove another version of TypeScript

* Remove possibly leftover loader

* Revert "Remove possibly leftover loader"

This reverts commit 7ce2d1a8854f3d7a833867f8ac3be7923a6cb1d8.

* Update to use no-op loader
2019-12-13 14:23:28 -06:00
Joe Haddad
62a6ece4b9 Emit Static Export Intent (#9737)
* Emit Static Export Intent

* Remove the old export detail on rebuild

* Add test cases

* fix export

* Add a resolve return
2019-12-13 13:30:22 -06:00
JJ Kasper
677a9509f3 Fix query values being passed in dev mode for SSG (#9734)
* Fix query values being passed in dev mode for SSG

* Update test names
2019-12-13 13:14:09 -05:00
Joe Haddad
88de2328e5 Enable Page Symbol For /_error (#9730) 2019-12-13 14:45:15 +01:00
Joe Haddad
5a8ae915dd
v9.1.6-canary.6 2019-12-12 14:46:19 -05:00
Joe Haddad
1a0a76c011 New File Size Output (#9726)
* New File Size Output

* fix test
2019-12-12 20:44:34 +01:00
Joe Haddad
a133f850fa Refine Pages Output (#9725) 2019-12-12 17:20:24 +01:00
Joe Haddad
529ab0c037
v9.1.6-canary.5 2019-12-12 07:37:17 -05:00
Joe Haddad
5b57a7527d Improve Build Output for SSG (#9719)
* Improve Build Output for SSG

* Swap out symbols and reasons

* adjust text more

* Add test

* Expect more output lines

* fix test case
2019-12-12 10:45:45 +01:00
Joe Haddad
867c459e1e
Add CSS Module TypeScript Types (#9717)
* Add CSS Module TypeScript Types

* Fix types

* Try another way
2019-12-11 19:45:01 -05:00
Joe Haddad
b116856938
v9.1.6-canary.4 2019-12-11 18:10:52 -05:00
Joe Haddad
e68e50d6e6
Add More Configuration File Options (#9713) 2019-12-11 16:56:47 -05:00
Joe Haddad
2347e3e47e
Adjust return value (#9712)
* Adjust return value

* Add delay
2019-12-11 16:32:16 -05:00
JJ Kasper
a40a32d1cc Fix SSG tests failing on windows (#9710) 2019-12-11 14:36:35 -05:00
Joe Haddad
c4c3173297
Fix CSS Modules Relative Path on Windows (#9709) 2019-12-11 14:21:40 -05:00
Joe Haddad
6d7f27e417
v9.1.6-canary.3 2019-12-11 12:00:44 -05:00
Joe Haddad
179e627a36
Redesign PostCSS Configuration Loading (#9704)
* Redesign PostCSS Configuration Loading

* Test array configuration

* Test new configuration handling

* Remove unnecessary async
2019-12-11 11:51:10 -05:00
Joe Haddad
a6dc0e1603 Adjust postcss-modules Message (#9703) 2019-12-11 09:23:06 -06:00
Joe Haddad
a968b38007
v9.1.6-canary.2 2019-12-11 07:40:35 -05:00
Joe Haddad
734989d836 [Experimental] CSS Module Support (#9686)
* CSS Module Support

* Fix Server-Side Render of CSS Modules

* Fix Jest Snapshots
https://github.com/facebook/jest/pull/8492

* Fix snapshots

* Add test for CSS module edit without remounting

* Add tests for dev and production style being applied

* Add missing TODOs

* Include/exclude should only be applied to issuer, not the CSS file itself

* Add CSS modules + node_modules tests

* Test that content is correct

* Create Multi Module Suite

* Add client-side navigation support for CSS

* Add tests for client-side nav

* Add some delays

* Try another fix

* Increase timeout to 3 minutes

* Fix test

* Give all unique directories
2019-12-11 11:46:12 +01:00
Joe Haddad
e11cf22721 Enable New Chunking for CSS (#9688)
* Enable New Chunking for CSS

* set false
2019-12-10 14:21:52 -06:00
Joe Haddad
be56af6268
v9.1.6-canary.1 2019-12-10 14:31:03 -05:00
JJ Kasper
83eeda085b Fix not detecting legacy getStaticParams in serverless mode (#9685)
* Fix not detecting legacy getStaticParams in serverless mode

* Update test/integration/prerender-legacy/test/index.test.js
2019-12-10 14:30:22 -05:00
JJ Kasper
da1ef5062f Refactor next-server some for easier page checking (#9671)
* De-dupe pagesManifest

* Update handleApiRequest a bit

* Simplify handleApiRequest a bit

* Update packages/next/next-server/server/next-server.ts


Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2019-12-10 10:08:42 -05:00
JJ Kasper
6c103ef5a6 Add checking of custom routes for invalid fields (#9434)
* Add checking of custom routes for invalid fields

* Remove un-used test imports

* Mentioned statusCode can be undefined in error message

* Update test

* Update invalid routes output

* Add checking to make sure source/destination start with slash

* Update import
2019-12-10 09:54:56 -05:00
Joe Haddad
551daaf12c
v9.1.6-canary.0 2019-12-10 08:47:07 -05:00
Janicklas Ralph
12c83fb721 Adding Router as an app level dep (#9675)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy

* Bumping native-url version, includes fix for IE11

* Update lock file

* Updating native-url, fixes issue on IE11

* Fix sourcemap being added in document

* Adding Router as an app level dep. Fixes Router not being added as a dep to pages without Link when granularChunks is enabled

* Fix typescript error
2019-12-10 12:30:26 +01:00
Joe Haddad
9b6ea9d466 Refactor Webpack Configuration (#9651)
* WIP

* Move data experiment

* Do not throw away rules

* Remove test code

* Correct next data behavior

* Add support for async composing

* Remove unnecessary workaround

* Rename Field
2019-12-09 14:08:15 -06:00
Joe Haddad
d64587e1a3
v9.1.5 2019-12-09 13:51:00 -05:00
Joe Haddad
c4821c7a24
v9.1.5-canary.17 2019-12-09 13:48:00 -05:00
JJ Kasper
963d598dc1
Add tests for optional chaining and nullish coalescing (#9665)
* Add tests for optional chaining and nullish coalescing

* Add integration tests
2019-12-08 12:38:22 -06:00
JJ Kasper
5fe7dcde4c
v9.1.5-canary.16 2019-12-08 12:29:57 -06:00
Sayuti Daniel
26a6a37316 feat: optional chaining and nullish coalescing (#9615) 2019-12-08 12:46:44 +01:00
JJ Kasper
a557b7e75f
v9.1.5-canary.15 2019-12-07 00:04:10 -06:00
Joe Haddad
ed1a9450f0 Disable SSG Transform on Non-SSG Pages (#9657)
* Disable SSG Transform on Non-SSG Pages

* correct test
2019-12-07 00:03:29 -06:00
Joe Haddad
04b2f0ebe1
Use Real Identifier for SSG Transform (#9656) 2019-12-07 00:52:24 -05:00
Joe Haddad
cbf8e0b2c4
Bump Babel Cache Key (#9655) 2019-12-06 23:30:58 -05:00
Joe Haddad
0c49d7dff7
v9.1.5-canary.14 2019-12-06 22:59:25 -05:00
Joe Haddad
bbc62a07be
Only Remove Server-Side Imports (#9653)
* Only Remove Server-Side Imports

* Cleanup imports
2019-12-06 22:57:14 -05:00
Joe Haddad
b4db0421ff
Rewrite SSG Transform for Recursive Cleanup (#9652) 2019-12-06 22:03:55 -05:00
Joe Haddad
2a18f03611
v9.1.5-canary.13 2019-12-06 11:51:18 -05:00
Joe Haddad
cb4c08c02b
Fix SSG Named Export Transform (#9649) 2019-12-06 11:50:50 -05:00
Joe Haddad
10b2eb5b31
Fix Import Shaking for Namespaces (#9650) 2019-12-06 11:46:00 -05:00
Joe Haddad
4894567fa9
v9.1.5-canary.12 2019-12-05 20:22:13 -05:00
Joe Haddad
e76fc18675
Remove Scope Bindings for SSG (#9642) 2019-12-05 18:05:50 -05:00
Joe Haddad
7a51b888c5 Add SSG Support for VariableDeclarations (#9641) 2019-12-05 16:43:18 -06:00
Joe Haddad
a718df5f56
Rewrite SSG Transform (#9640)
* Rewrite SSG Transform

* Add Named Declaration Support

* more adjustments

* Re-crawl scope
2019-12-05 17:22:41 -05:00
Joe Haddad
b4d0740c62
Separate SSG Transform from Config (#9639)
* Separate SSG Transform from Config

* update fn name

* fix
2019-12-05 16:43:11 -05:00
Joe Haddad
96338a7631
v9.1.5-canary.11 2019-12-05 13:38:57 -05:00
Prateek Bhatnagar
5b10ea003c adding duration for custom performance marks (#9592) 2019-12-05 13:36:51 -05:00
Joe Haddad
57947ed2f3
v9.1.5-canary.10 2019-12-05 13:11:41 -05:00
Joe Haddad
bf5e295c0c Correct URI Encoding Order (#9638)
* Correct URI Encoding Order

* Add prefetch test

* verify encoding
2019-12-05 12:10:37 -06:00
Joe Haddad
30ff9a339f Remove Extraneous Imports in Pages (#9627)
* Remove Extraneous Imports in Pages

* Add test

* bump cache key
2019-12-05 11:04:00 -06:00
Janicklas Ralph
9bf48687a7 Only Load JS Files for Polyfills (#9628)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy

* Bumping native-url version, includes fix for IE11

* Update lock file

* Updating native-url, fixes issue on IE11

* Fix sourcemap being added in document
2019-12-05 10:59:49 -05:00
Natalie Marleny
14c553c932 Enhancement: Upgrade devalue version to 2.0.1 (#9611) 2019-12-03 16:25:51 -06:00
Joe Haddad
21e1db7bc1
Aggressively Replace Constants (#9610)
* Aggressively Replace Constants

* Test both windows

* add other switch
2019-12-03 16:08:49 -05:00
Luis Alvarez D
56c1392bd6 Use NextComponentType in NextPage (#9575) 2019-12-03 13:35:20 -05:00
Joe Haddad
0c03066983
v9.1.5-canary.9 2019-12-03 11:39:49 -05:00
Joe Haddad
2477bd30b7 Upgrade Webpack and Terser (#9608)
Closes #9602
2019-12-03 10:35:31 -06:00
Joe Haddad
063e174076
Add Support for Event Flushing (#9606)
* Add Support for Event Flushing

* Update packages/next/export/index.ts

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-12-03 11:18:58 -05:00
JJ Kasper
bf1d872f89 Fix extra prerender error for invalid getStaticProps usage (#9593)
* Fix extra prerender error for invalid getStaticProps usage

* Add error for getStaticProps usage in _error

* Revert erroring for SSG in _error
2019-12-02 17:12:10 -05:00
Joe Haddad
bd8b1221e5
Support repeating Dynamic Route Params (#9599)
* Test for desired catch all behavior

* Support `repeat`ing Dynamic Route Params

x-ref: #9598
2019-12-02 16:55:49 -05:00
Joe Haddad
69b7538dce
Simplify getRouteRegex Callsites (#9597) 2019-12-02 16:43:30 -05:00
Joe Haddad
dd1f610f8d
Add SSG Tests with Catch All Routing (#9594)
* Add SSG Tests with Catch All Routing

* fix node version compat

* Remove unneeded query
2019-12-02 16:04:25 -05:00
Lachlan Campbell
590e8d5c26 Fix docs typo: “your sites SEO” (#9579) 2019-11-30 22:16:46 -05:00
Joe Haddad
11c7ca33d1
v9.1.5-canary.8 2019-11-27 23:24:12 -05:00
JJ Kasper
89b22d2994 Fix missing getStaticProps error in serverless mode (#9532)
* Make sure to show missing getStaticProps error in serverless mode

* Update test
2019-11-27 23:23:32 -05:00
JJ Kasper
45832e4421 Make sure to parse query values for SSG page after hydration (#9545)
* Make sure to parse query values for SSG page after hydration

* Update to re-use __NEXT_SPR
2019-11-27 23:16:19 -05:00
Joe Haddad
ca3f881a42 s/getStaticParams/getStaticPaths/ (#9565)
* WIP: rename get static paths

* Adjust logic

* Add warning

* rename constant

* Check for error when using old method

* Add friendly error message

* Test for message of invalid keys

* replace index with dots
2019-11-27 21:46:16 -06:00
Joe Haddad
a6656a0b84
Upgrade path-to-regexp (#9553)
* Upgrade `path-to-regexp`

* Correct import

* Update delimiter

* Fix path match

* Fix hot loader

* Fix params.path usage and pathToRegexp import

* Revert changes for params.path

* Fix lint

* Simplify path match function

* Delimiter should always be `/`

* Fix passed in params

* Add new regex wrapping

* Wrap another route

* Fix error message match
2019-11-27 16:48:28 -05:00
JJ Kasper
375b86cd8a
v9.1.5-canary.7 2019-11-27 15:31:59 -06:00
Janicklas Ralph
6517246b22 Native url (#9561)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy

* Bumping native-url version, includes fix for IE11

* Update lock file

* Updating native-url, fixes issue on IE11
2019-11-27 13:17:05 -06:00
Joe Haddad
75e6e21029
Add Next.js Version as Metadata (#9551) 2019-11-27 11:28:40 -05:00
JJ Kasper
6ec56d3750 Update to latest fork-ts-checker version (#9555) 2019-11-27 11:16:55 -05:00
JJ Kasper
5cf9ef6582 [WIP] Add err.sh for prerender error (#9548) 2019-11-27 10:54:57 +01:00
Kristoffer K
63886b36a2 fix: resolve preset-modules (#9538)
* fix: require preset-modules

* Update packages/next/build/webpack/plugins/next-esm-plugin.ts

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

* fix formatting
2019-11-26 14:56:08 -05:00
Janicklas Ralph
be496a260c Update native-url package for IE compat (#9539)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy

* Bumping native-url version, includes fix for IE11

* Update lock file
2019-11-26 14:14:24 -05:00
Adam Stankiewicz
9c9f0609a0 Fix deduplicating dynamic (array) meta tags (#9315) 2019-11-26 12:27:33 -05:00
Jason Miller
1f15746176 [modern] preset-modules & fix custom babelrc (#9489)
* Modernize additional common Babel configurations.

* Add @babel/preset-modules dependency

* code quality

* Use modern terser ecma mode for .module.js bundles.
2019-11-26 11:27:26 +01:00
Prateek Bhatnagar
698f522d71 Wait till load for paint metrics (#9406)
* wait till load to fire paint metrics as they might not be available upfront

* adding performance observer

* adding check for performance user timing
2019-11-26 10:52:38 +01:00
Yosuke Furukawa
93f7da2845 Allow custom amp validation (#9191)
* Allow custom amp validation

* Update packages/next/export/index.ts

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

* Update packages/next/server/next-dev-server.ts

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

* chore: fix prettier error

* fix: set amp.valiator undefined by default
2019-11-26 10:47:55 +01:00
JJ Kasper
cd8e72d5e3 Add custom routes to build output (#9517)
* Add custom routes to build output

* De-dupe code a bit
2019-11-26 10:33:47 +01:00
Janicklas Ralph
04a7f1e85d Replace url polyfill with self.URL (#9200)
* Adding native-url package

* Bumping native-url version

* Upgrading native-url

* Logging stats object for debugging

* Logging stats object for debugging

* Adding try catch to the error lines

* Experimenting with regex

* Experimenting with regex

* Experimenting with regex

* Testing regex changes

* Fixing defer-script test case to not include polyfill.js

* Meging changes with existing polyfill work

* Bumping version

* adjust webpack config

* Reduce size in size test

* Remove 1kb from legacy
2019-11-25 23:10:02 -05:00
Joe Haddad
3ebc61045a
v9.1.5-canary.6 2019-11-25 17:18:00 -05:00
Joe Haddad
302407486e
Specify Invalid Dynamic Route Values (#9525) 2019-11-25 17:15:23 -05:00
Joe Haddad
4656f52d15
CSS Support Customization (#9502)
* CSS Support Customization

* Sort imports

* Correct PostCSS plugin loading

* Add css customization test

* Test "bad" css configuration

* Add load config test

* adjust spacing

* adjust spacing 2x

* Only allow config through JSON

* Support excluding false plugins

* Test tailwind css behavior

* Test plugin exclusion

* Fix unit test

* Fix config file

* Remove more variants

* Update test cases
2019-11-25 16:52:29 -05:00
Joe Haddad
acf3517995 Catch Telemetry Initialization Error (#9518)
* Catch Telemetry Initialization Error
This catches telemetry initialization errors where a user's `os.tmpdir()` directory isn't writable by the process.

* adjust cond
2019-11-25 14:31:10 -06:00
JJ Kasper
409f20a9ca
Fix AMP HTML content emit (#9468)
* Add failing test

* Escape dollar signs in AMP HTML

* Update to not use replace for updating AMP_RENDER_TARGET
2019-11-25 14:05:52 -06:00
Joe Haddad
caa5347873
Remove Legacy Code (#9515)
The `sprStatus` module state is no longer used (and shouldn't be!). We can safely remove this code.

I also renamed the drop bundle identifier while I was here.
2019-11-25 14:32:25 -05:00
Joe Haddad
0a86b149fa
Purge Babel Cache (#9514)
* Bust Babel Cache

* Increase e
2019-11-25 14:16:04 -05:00
Joe Haddad
77c4b4de12
v9.1.5-canary.5 2019-11-25 11:46:02 -05:00
Joe Haddad
b80d4d6893
Drop Re-Exported iSSG Imports (#9512)
* Drop Re-Exported iSSG Imports
This pull request adds loader support for the following export form:
```js
export { getStaticParams as unstable_getStaticParams } from '../../lib/docs/page';
export { getStaticProps as unstable_getStaticProps } from '../../lib/docs/page';
```

This will now result in correct detection and removal.

* Add unit tests for next page config behavior

* Test extra function is not dropped
2019-11-25 11:44:24 -05:00
JJ Kasper
ff2d28c4ff Add err.sh for invalid multi-match usage (#9498)
* Adds err.sh for multi-match error

* Fix missing apostrophe

* Update regex to catch other param names

* Add test for multi-match error

* Update test/integration/invalid-multi-match/test/index.test.js
2019-11-23 02:23:01 +01:00
Joe Haddad
63671782be
v9.1.5-canary.4 2019-11-21 21:17:39 -05:00
Joe Haddad
8a087d50b7
next export should skip iSSG fallback page (#9491)
* `next export` should skip iSSG fallback page

* Move config to correct place
2019-11-21 20:20:19 -05:00
Joe Haddad
dc0c940978
v9.1.5-canary.3 2019-11-21 15:21:55 -05:00
Joe Haddad
8e7ddeb6ca
Ensure CSS Is Preloaded First (#9486)
* Ensure CSS Is Preloaded First

* add test polyfills
2019-11-21 13:24:10 -05:00
Joe Haddad
61f4e70135
Upgrade Babel Dependencies (#9478)
* Upgrade Babel Dependencies

* Update test for new size
2019-11-20 21:53:12 -05:00
JJ Kasper
14cfadf599
v9.1.5-canary.2 2019-11-20 11:37:42 -06:00
JJ Kasper
29d267a1dc
Add handling for rewriting to /_next with catchall (#9466)
* Add handling for rewriting to /_next with catchall

* bump
2019-11-20 09:53:31 -06:00
JJ Kasper
546bb68a05
v9.1.5-canary.1 2019-11-19 11:30:24 -06:00
Tim Neutkens
10066aac9a Exclude cache from being deleted in dev (#9448)
* Exclude cache from being deleted in dev

* Exclude cache directory from delete

* Fix clean regex and update tests

* Remove extra param comment
2019-11-19 10:40:13 -06:00
Joe Haddad
4c549391de
v9.1.5-canary.0 2019-11-19 00:21:03 -05:00
Maël Nison
213c243c18 Adds missing dependency (#9453)
* Adds missing dependency

* Update package.json

* Update yarn.lock
2019-11-19 00:13:25 -05:00
Bart Langelaan
57fa38a39d Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
JJ Kasper
0b18f854ba
v9.1.4 2019-11-18 16:04:17 -06:00
Tim Neutkens
34125559eb v9.1.4-canary.8 2019-11-17 20:29:58 -08:00
Tim Neutkens
6a2c16a945
Update router to have only one route traverse pass (#9435)
* Fix next-news inconsistent return type

* Add failing test for static file rewrite

* Revert "Fix next-news inconsistent return type"

This reverts commit b66e76fb86061e45741c3c4bb9296a0874900f76.

* Add failing test for double redirect

* Fix bug in matcher when having multiple redirects

* Remove custom traversal in favor of router handling it

* Update next-server.ts

* Update router.ts

* Temporarily disable test

* Don't deeply resolve redirects

* Support combined parameters + query passing

* Make sure params are correctly passed in

* Add test for hash in route
2019-11-17 16:12:48 -08:00
JJ Kasper
c7d2da4abd
v9.1.4-canary.7 2019-11-15 20:01:54 -06:00
JJ Kasper
09cab2df5e Fix typo in serverless loader (#9431)
* Fix typo in serverless loader

* Add test for top level error in API route

* Fix type error
2019-11-15 18:00:24 -08:00
JJ Kasper
fefe453ebf
v9.1.4-canary.6 2019-11-15 16:39:36 -06:00
JJ Kasper
dd990506c0 Fix recursive copy failing if more folders than concurrency (#9429)
* Fix recursive-copy function failing with more
folders than concurrency

* Make default concurrency 32 for recursive-copy
2019-11-15 13:53:59 -08:00
JJ Kasper
b0a79e00e5
v9.1.4-canary.5 2019-11-15 11:13:28 -06:00
Joe Haddad
d90c853111
Clean up old flag (#9421) 2019-11-14 23:48:12 -08:00
JJ Kasper
53f3cb627a Remove top level usage of loader imports in next/document (#9419)
* Don't use loader import at top level in next/document

* Update ts-ignores
2019-11-14 23:33:52 -08:00
Joe Haddad
ba5e6943fa
[Experimental] Catch-all Route Support (#9416)
* Catch-all Route Support

* Add SSR tests

* Add additional test

* Add unit tests

* Put the feature behind a flag

* Apply suggestions from code review

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

* Fix test
2019-11-14 23:19:41 -08:00
Janicklas Ralph
332852bf01 Integration test case for fetch alias (#9391)
* Polyfilling fetch and object-assign

* Polyfilling corejs object-assign

* Adding object-assign in polyfills.js. IE11 does not support Object.assign

* Fixing failing test

* Updating object.assign polyfill to fix aliasing

* Updating test case value to match new build stats

* Increasing the size of default build to 225kb

* Fixing defer-script test case to not include polyfill.js

* Revert README.md

* Re-design the polyfill approach based on PR feedback

* Adding comment and fixing test case

* Rename polyfills chunk

* Extract aliases into helper

* Remove extra new line

* Fix TypeScript typings

* Adding _internal_fetch alias

* Adjust build manifest plugin

* Build manifest plugin changes - adding a separate entry for polyfills

* Rename polyfills entry in build-manifest.json

* Remove old comment

* Fix TS

* Set key

* Polyfills already added

* Filtring polyfill.module.js

* Fix test

* Add __internal_fetch to alias rule

* Adjust name

* bump size

* ignore polyfills

* sigh

* Aliasing Object.assign

* Mergin latest changes

* Integration test for polyfilling fetch

* Remove comment

* Fix prettier error

* Fix review comments

* Fix review comments

* Update fetch.js

* Fix tests
2019-11-14 22:47:08 -08:00
Joe Haddad
1544443fd5
Improve route param error message 2019-11-14 16:45:52 -08:00
Joe Haddad
1fa612d844
refactor(router): extract handle slug method (#9414)
This refactors the `handleSlug` method in preparation for catch-all routing.
This PR is opened separately so the catch-all diff can be reviewed easier.
2019-11-14 14:12:27 -08:00
Joe Haddad
5905397457
v9.1.4-canary.4 2019-11-12 21:57:11 -08:00
JJ Kasper
5d5af48425 Don't treat static as an internal route when the folder is not provided (#9394)
* Render 404 for isInternalUrl in render

* Fix internal handling for static dir
2019-11-12 20:07:19 -08:00
Joe Haddad
553052f903
Remove unused property skeleton (#9393) 2019-11-12 19:26:42 -08:00
Joe Haddad
6387d9b5bc
Fix Dynamic next export Page Hydration Mismatch (#9388)
* Fix `next export` Hydration Mismatch

* Lower timeout to 1 minute
2019-11-12 18:34:12 -08:00
JJ Kasper
154d78461c Replace historyId with initial page tracking (#9380)
* Replace historyId with initial page tracking

* Apply suggestions from code review

* Update packages/next/next-server/lib/router/router.ts

* Apply suggestions from code review
2019-11-12 13:37:47 -08:00
Janicklas Ralph
788654e2fc Decrease the load priority of client _buildManifest (#9167)
* Decreasing the load priority of _buildmanifest file

* Remove buildmanifest filter in preload as its not needed anymore

* Removing test for _buildManifest.module.js

* re-add code

* re-add testing

* Re-add filtering

* add missing comment

* Adjust ordering

* reduce diff
2019-11-10 23:35:17 -08:00
Joe Haddad
7bb7d70650
Polyfill Object.assign by Default (#9369)
* Polyfill `Object.assign` by Default

* fix formatting
2019-11-10 20:48:11 -08:00
Lee Robinson
b3dbcbb5bb Fix typo in API routes documentation. (#9373) 2019-11-10 20:07:45 -08:00
Mathieu Triay
be86ab00e1 Update webpack config to also take next-stylus into account (#9277) 2019-11-10 19:56:29 -08:00
Joe Haddad
18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00
JJ Kasper
c6f1c0c064
v9.1.4-canary.3 2019-11-10 13:01:52 -08:00
Joe Haddad
8107533b21
Bind fetch to self instead of window (#9368) 2019-11-10 12:54:29 -08:00
Slobodan Mišković
8ee536df09 Fix canonical rel link generation (#9357) 2019-11-10 12:44:15 -08:00
Joe Haddad
a7feb46886
v9.1.4-canary.2 2019-11-09 22:44:50 -08:00
Joe Haddad
8dcec04bd1
Fix window.fetch Polyfill (#9364) 2019-11-09 21:25:32 -08:00
Joe Haddad
32d702d204
v9.1.4-canary.1 2019-11-09 20:03:37 -08:00
JJ Kasper
4e3b5ae20c
Update routes-manifest and add tests (#9361)
* Test custom-routes serverless

* Make sure we add default statusCode to routes-manifest

* Update routes-manifest

* Add DEFAULT_REDIRECT_STATUS constant
2019-11-09 20:00:54 -08:00
Joe Haddad
7c83a12332
v9.1.4-canary.0 2019-11-09 16:27:10 -08:00
Tim Neutkens
9b999b1ce3
Convert wrapper class to function component (#9095)
* Convert wrapper class to function component

* Remove unneeded export

* Check versions of chrome and chromedriver

* Update to chromedriver 76

* Revert config.yml

* Update with-router.tsx
2019-11-09 14:56:59 -08:00
JJ Kasper
d19e825daa Implement custom routes RFC (#9157)
* add initial custom-routes handling

* Add tests for custom-routes

* Handle chained redirects, separate dev custom
routes reading, and add version to routes manifest

* Handle no routes manifest

* Swap build custom routes calling

* Add flatten-routes

* Add flattening of custom routes

* Re-work implementation to follow routes top-down

* Add regex field to routes-manifest

* Fix path-to-regexp match breaking after upgrade

* Fix duplicate const from merge

* Add some changes from review

* Don't make path-match strict

* add default custom route values

* Update routes-manifest

* Update options for path-match

* Remove todo

* Add test for rewrite with params

* Only use strict mode for custom routes

* Update dynamic-routing test

* Move getCustomRoutes to prepare

* Remove extra change

* Update handling for error-in-error test

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Apply suggestions from review

* Update slice change

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Apply suggestions from review

* Fix TypeScript error

* Fix getCustomRoutes in dev mode

* Apply suggestions from code review

* Update slice

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Delete un-used test page

* Add test for param overwriting

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Add extra check to param test
2019-11-09 14:34:52 -08:00
JJ Kasper
820a9790ba Add a routes manifest with the dynamic routes (#9347)
* Add a routes manifest with the dynamic routes

* Update to use pageKeys for windows compat

* Update routes-manifest test
2019-11-08 16:51:19 -08:00
Giuseppe
b929debd76 Upgrade styled-jsx (#9348)
It should fix an escaping issue with source maps on Windows. Also the library size should be a bit smaller https://github.com/zeit/styled-jsx/pull/591
2019-11-08 12:27:20 -08:00
Tim Neutkens
0499316650 Add check for now.json and custom server (#9346)
* Check if the user has a now.json

* Check for now.json

* Add check for custom server
2019-11-08 09:03:50 -08:00
Joe Haddad
c5faf73c5a
v9.1.3 2019-11-07 20:01:56 -08:00
JJ Kasper
5bf6760fa5
v9.1.3-canary.5 2019-11-07 17:28:28 -08:00
Joe Haddad
fd36e41912
v9.1.3-canary.4 2019-11-07 16:52:11 -08:00
Luis Alvarez D
c8c4efba6c Remove the parameterized-routing example (#9297)
* Remove the example

* Include readme with link to alternative
2019-11-07 10:06:35 -08:00
Joe Haddad
7fe42fb057
v9.1.3-canary.3 2019-11-07 09:42:18 -08:00
Tim Neutkens
210dca8d7a Ensure we correctly decide on which packages need better interopt (#9327) 2019-11-06 19:14:32 -08:00
JJ Kasper
354de28422 Only add static files route if folder exists (#9305)
* Only add static files route if folder exists

* Remove extra import
2019-11-05 06:55:35 +01:00
Alex Castle
b37fcbb50b Prevent CSS script tags in granular chunks (#9306)
* Don't add script tags for css files on client side navigation with granular chunks

* Filter for JS, instead of against CSS
2019-11-05 06:54:17 +01:00
Joe Haddad
9defdd0a18
v9.1.3-canary.2 2019-11-04 15:32:17 -05:00
Joe Haddad
dee2888404
Allow TypeScript Namespaces (#9308) 2019-11-04 15:26:31 -05:00
Joe Haddad
8e62c9b688
Enforce the framework Chunk (#9250) 2019-11-04 11:25:14 -05:00
Joe Haddad
bbf705f262
Simplify Build Output (#9281)
* Simplify Build Output

* Remove noop tests

* Drop 

* Remove bolding
2019-11-04 11:14:04 -05:00
Tim Neutkens
21f0db8181 Call getInitialProps on Component when it’s not defined on App (#9287)
Fixes #9284
2019-11-02 11:00:55 -04:00
JJ Kasper
739322d06b Handle backslashes for plugins (#9282) 2019-11-01 23:06:34 -04:00
Janicklas Ralph
ff2d3fd87d Polyfill window.fetch by Default (#9168)
* Polyfilling fetch and object-assign

* Polyfilling corejs object-assign

* Adding object-assign in polyfills.js. IE11 does not support Object.assign

* Fixing failing test

* Updating object.assign polyfill to fix aliasing

* Updating test case value to match new build stats

* Increasing the size of default build to 225kb

* Fixing defer-script test case to not include polyfill.js

* Revert README.md

* Re-design the polyfill approach based on PR feedback

* Adding comment and fixing test case

* Rename polyfills chunk

* Extract aliases into helper

* Remove extra new line

* Fix TypeScript typings

* Adding _internal_fetch alias

* Adjust build manifest plugin

* Build manifest plugin changes - adding a separate entry for polyfills

* Rename polyfills entry in build-manifest.json

* Remove old comment

* Fix TS

* Set key

* Polyfills already added

* Filtring polyfill.module.js

* Fix test

* Add __internal_fetch to alias rule

* Adjust name

* bump size

* ignore polyfills

* sigh
2019-11-01 21:00:56 -04:00
bennett4
99755b6742 fixed spelling of cookies (#9283) 2019-11-01 20:45:16 -04:00
Joe Haddad
aef927d576
Disallow iSSG revalidation period of zero (#9280)
* Disallow iSSG revalidation period of zero

* Fix revalidation period in test
2019-11-01 15:38:02 -04:00
Tim Neutkens
7c80febcf7 Initial plugins implementation (#9139)
* Add initial bit for plugins

* Add checks for needed metadata values

* Add test

* Initial plugins changes

* Add handling for _app middleware

* Add loading of _document middleware and
handling of multiple default export syntaxes

* Fix insert order for middleware member expression

* Remove early return from middleware plugin from testing

* Add tests for current plugin middlewares

* Update test plugin package.json

* Update handling for class default export

* Update to use webpack loader instead of babel
plugin, remove redundant middleware naming, and add field for required env for plugins

* Add middleware to support material-ui use case
and example material-ui plugin

* Update tests and remove tests stuff from google analytics plugin

* Remove old plugin suite

* Add init-server middleware

* Exit hard without stack trace when error in collecting plugins

* Add on-error-client and on-error-server and update
to run init-server with next-start in serverless mode

* Update init-client for google analytics plugin

* Add example Sentry plugin and update with-sentry-simple

* Remove middleware field/folder and use src dir for plugins

* Add post-hydration middleware and update
material-ui plugin

* Put plugins code behind flag

* Update chromedriver

* Revert "Update chromedriver"

This reverts commit 1461e978e677f7da05e29e0415ec614a04bf65f9.

* Update lock file

* Remove un-needed _app for sentry example

* Add auto loading of scoped packages, add plugins
config for manually listing plugins, and update
to only collect plugins once

* Update example plugins

* Expose plugins' config

* Rename plugin lifecycles and add babel-preset-build

* Rename other methods with unstable

* Update log when plugin config overrides auto-detecting
2019-11-01 14:13:13 -05:00
Joe Haddad
683903785a
Require Node 8.10 (#9278) 2019-11-01 13:43:29 -04:00
Joe Haddad
1a436535ce
v9.1.3-canary.1 2019-10-31 16:28:00 -04:00
JJ Kasper
b320f5bd59 Add handling for exportTrailingSlash for iSSG pages (#9258)
* Add handling for exportTrailingSlash for iSSG pages

* Update index.test.js
2019-10-31 16:26:47 -04:00
JJ Kasper
aafbd53cbf Remove dead code elimination for when iSSG isn't used (#9267)
* Don't rely on page-config plugin to detect iSSG usage

* Make sure to only update sprStatus if page file

* Remove dead-code elimination for iSSG code

* Revert next-page-config.ts

* Update index.js

* Update index.test.js
2019-10-31 16:07:35 -04:00
Tim Neutkens
37ee8fc9e7 Update _app documentation to reflect no longer needing next/app (#9268)
* Update _app documentation to reflect no longer needing next/app

* Remove lint-staged
2019-10-31 10:53:55 -04:00
Petra Jaros
1e9407459d Fix import next from "next" (#9216) 2019-10-31 13:20:05 +01:00
JJ Kasper
fa5fb97ce8 Make sure to pipe output from staticCheckWorkers (#9256) 2019-10-31 12:38:09 +01:00
Jason Miller
c966900768 Bugfix/Performance: Start the modern child compiler earlier (#9257)
* Start the modern Child Compiler earlier during builds

* fix child compiler errors not bubbling
2019-10-31 12:37:07 +01:00
Joe Haddad
c2a2417e0c
v9.1.3-canary.0 2019-10-30 13:50:18 -04:00
JJ Kasper
f16f868ea1
Make sure to handle paths with dot in name for SPR (#9227) 2019-10-30 11:29:23 -05:00
Ilya
8dd394a055 Load granular chunks with correct asset prefix (#8993)
* closes #8989

fix

closes #8989

* test

* Update next.config.js

* Revert page1.js

* Revert page2.js

* Delete page4.js

* Delete page3.js

* Update index.test.js

* Revert index.test.js

* Revert next.config.js
2019-10-30 10:25:11 -04:00
Gerald Monaco
f632567bcf Add experimental config for React Mode (#9207)
* Add experimental config for React Mode

* Use latest types

* Use latest types
2019-10-30 09:39:58 -04:00
sagar talla
6707909690 Error when user tries to use uncompiled next.config.ts (#9223)
* Throw Error for next.config.ts

Ref: https://github.com/zeit/next-plugins/issues/555

* Check for .js else .ts

* Update Error Message

Co-Authored-By: Alexander Kachkaev <alexander@kachkaev.ru>

* Add test case when both next.config.js and next.config.ts exist.

* Remove extra constant CONFIG_FILE_TS and Add check for ts/tsx/json

* Rename test config parameter and add tsx and json files

* Change messege

* change value

* Update next.config.json

* Update next.config.json

* Change message  and add jsx filter

* Adjust

* Simplify test

* adjust
2019-10-30 08:18:33 -04:00
Joe Haddad
6b54e9ed66 Fix Prettier Commit Hook (#9245)
* Apply format to webpack config

* hit all files
2019-10-30 12:35:51 +01:00
Jan Karres
3b3d20f729 Check if 'formatAmpMessages' returns a none empty string in Next.js build process (#8924) 2019-10-29 23:49:40 -04:00
Jason Miller
5f203b8342 Improve serverless build performance (#9155)
* Improve serverless build performance

Next's serverless build uses a custom resolver, injected the via Webpack's `externals` option that delegates out to `resolve-request` to more aggressively pull node modules into the serverless bundles.

When profiling a large Next.js application, I noticed an excessive number of filesystem calls near the end of the build. I narrowed this down to the serverless compiler pass, and eventually the custom resolver function that is the subject of this PR.  As it turns out, around half of the calls to the `externals` custom resolver function are for a `request` path that is a relative import. Next doesn't have any specific logic to apply to relative imports - it only needs to special-case bare module resolution.

Adding a simple bypass for relative module resolution reduces the number of blocking filesystem-bound `resolveRequest()` calls by 50% on a certain well-known Next.js website. This also results in a 30% reduction in production build times for incremental builds.

* Explain more in the comment
2019-10-29 23:36:22 -04:00
Christoph Tavan
17d7544f45 Remove concurrency option from next export (#9197)
Usage of this option was removed in
61b8b7323e but the cli was not updated.
2019-10-29 23:07:42 -04:00
JJ Kasper
c4bef164ce Add unique identifier to router instance (#9015)
* Update to use a historyId to track invalid popstates

* Remove log from debugging

* Use Math.random instead of Date.getTime to avoid mocks
2019-10-29 22:50:16 -04:00
Janicklas Ralph
d3293f7cd6 Dynamic granular chunking (#9090)
* Enable granular chunks config for all chunk types

Adding comment

Bug fix

* Update index.test.js

* Update index.test.js

* Fix test cases. Adding next/link to not trigger a different bug

* Removing obsolete comment
2019-10-29 21:27:41 -04:00
Joe Haddad
acf7d0ad3b
v9.1.2 2019-10-29 16:56:45 -04:00
Joe Haddad
cb7a184cd9
v9.1.2-canary.10 2019-10-29 11:14:39 -04:00
Joe Haddad
4dbd267c6a
Split TypeScript Flag Docs (#9231)
* Split TypeScript Flag Docs

* reword
2019-10-28 22:44:10 -04:00
Christoph Tavan
14ed867537 Disable worker_threads by default for firebase compatibility (#9199)
* Pass config.experimental.cpus to export during build

Currently, there is no way of specifying the number of worker threads of
`next export` when run as part of `next build`.

I suggest a sane default should be to just use the same amount of
workers that were used during the build process which currently seems to
be configured through `config.experimental.cpus`.

This setting is already respected in the two other places where
jest-workers are in use: The TerserPlugin and the staticCheckWorkers in
`next build`.

* Only enable worker threads if there is more than 1 worker

Multiple worker threads can cause problems when certain dependencies are
being used, see e.g. https://github.com/zeit/next.js/issues/7894

This patch allows disabling of worker threads by setting
`config.experimental.cpus = 1`.

The benefit of spawning 1 worker thread, if there is any at all, should
very limited anyways, so the workload can just as well be processed in
the main thread.

* Disable parallel build for firebase authentication example

* Add integration test to cover #7894

* Rename test suite and add worker_threads config

* Disable worker_threads by default

* Update index.test.js

* Use workerThreads config for TerserPlugin

* Update to use workerThreads config in
TerserPlugin for consistency

* Disable node 12 specific test
2019-10-28 20:01:24 -04:00
Alexander Kachkaev
ad2a3d65fd Add configuration flags to disable integrated type checker (#9138)
* Add a configuration flag to disable integrated type checker

* Add tests for typescript-transpileonly

* Restore removed argument

* Make output more coherent

* Split transpileOnly into ignoreDevErrors and ignoreBuildErrors

* Minor stylistic change
2019-10-28 11:02:03 -07:00
JJ Kasper
2d9f199105 Add warning for getStaticParams without getStaticProps (#9226)
* Add warning for getStaticParams without getStaticProps

* Throw error instead of logging to make sure it's noticed

* Lower default concurrency for tests
2019-10-28 10:24:29 -07:00
Joe Haddad
34e0ce6f05
Remove react-ssr-prepass from Next Deps (#9224) 2019-10-28 06:49:07 -07:00
Jan Potoms
ab0a8647dc API: Take multiple values into account for the query (#9196)
* Take multiple values into account

* make typescript happy
2019-10-26 20:10:06 +02:00
Tim Neutkens
20978af0b0 v9.1.2-canary.9 2019-10-26 19:44:44 +02:00
htbvo
211c84e1c9 allow NextScript to optionally defer javascript (#8980)
* allow NextScript to optionally defer javascript

* move defer options to experimental feature

* combine defer flags into a single option

* Update deferScripts to work with serverless target

* Add test for defer and async property

* Read the async property

* Check versions of chrome and chromedriver

* Update to chromedriver 76

* Fix test
2019-10-26 19:27:22 +02:00
Tim Neutkens
2fcff3de49
Update Babel dependencies (#9203)
* Update Babel dependencies

* Update sizes
2019-10-26 15:59:15 +02:00
Christoph Tavan
e506c41e8c Ensure that all <link> elements have a key prop (#9204)
Before this patch users would see the following warning during initial
compilation:

```
Warning: Each child in a list should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.
    in link
    in Head
    in html
    in Html
    in Document
    in Context.Provider
    in Context.Provider
```
2019-10-26 14:46:17 +02:00
Gerald Monaco
4421448f03 Add StrictMode toggle (#9161)
* Add StrictMode toggle

* Rename option to reactStrictMode

* Default to false initially
2019-10-26 00:20:38 +02:00
JJ Kasper
be42300e1f Ensure directory before flushing cache file (#9187)
* Ensure directory before flushing cache iSSG file

* Add test for prerender cache flush

* Nest the dynamic route test one more level

* update fetch for test

* Update error check
2019-10-25 13:56:00 -07:00
Miguel Ángel Durán
8227baf42c docs(api-routes): fix micro-cors example (#9184)
The correct option to use with `micro-cors` package is `allowMethods` instead `allowedMethods`. This PR fixes the example.
2019-10-23 17:14:51 -04:00
Joe Haddad
60ff5cc77e
v9.1.2-canary.8 2019-10-23 15:53:37 -04:00
JJ Kasper
d38da874cf Record src directory usage with version (#9023)
* Add tracking src dir usage to telemetry

* Move isSrcDir back to eventVersion

* Move spinner back

* Add test for isSrcDir telemetry

* Add test for dev mode
2019-10-22 22:42:16 -04:00
Joe Haddad
4328eea3a7
Add WSL to Metadata (#9171) 2019-10-22 21:13:18 -04:00
JJ Kasper
573fbff88a Add yarn check to tests (#9163)
* Add yarn check to tests

* Update yarn.lock

* Update lockfile some more

* Use resolutions to bump browserslist
2019-10-22 21:02:59 -04:00
Joe Haddad
b5d8767f44
Cache No-Revalidate Pages (#9170)
* Cache No-Revalidate Pages

* Specifically check for `false`
2019-10-22 20:40:33 -04:00
Joe Haddad
ae3410c3f3
Upgrade Lockfile (#9158)
* Upgrade Lockfile

* Fix types version mismatch

* Upgrade amphtml-validator

* Revert "Upgrade amphtml-validator"

This reverts commit 05068b2ad9f2f53429cf514b47b4f7924b0b9623.

* Disable AMP Tests

* Skip 2x more AMP tests
2019-10-22 11:42:43 -04:00
Joe Haddad
94c2c084ad
Upgrade React dependencies (#9152)
* Upgrade React dependencies

* Disable data tests

* Increase allowed default sizes
2019-10-21 14:27:21 -04:00
Joe Haddad
3a7603c44f
Update Prerender Error Message (#9143) 2019-10-20 18:11:29 -04:00
JJ Kasper
cd52fc9e91
v9.1.2-canary.7 2019-10-18 16:28:09 -05:00
Alex Castle
a82b5aed9b Update granular chunks to produce up to 25 chunks per entrypoint on high-complexity apps (#9129) 2019-10-18 13:36:03 -04:00
Joe Haddad
4d3cca3382
Warn on No Cache in CI (#9116)
* Warn on No Cache in CI

* Bold the note lead

* Add custom clarification for netlify

* Reorder

* Add tests

* Fix detection
2019-10-18 12:40:47 -04:00
Gerald Monaco
d28e46ac15 Support Concurrent Mode in Loadable (#9026) 2019-10-18 17:23:06 +02:00
Liran Cohen
b7efb3fffb Allow manually setting amphtml (#9098)
* allow to remove amphtml from desktop page

* only 1 link with amphtml rel

* clean up

* remove checkup for amphtml link

* Dedupe looping
2019-10-18 10:22:53 -05:00
JJ Kasper
499808fa2b
Make sure to update scope for page export declaration (#9115)
* Register page export declaration to scope

* Update to not need to traverse to update scope
2019-10-18 09:37:09 -05:00
Melanie Seltzer
c650ed9a2a Dedupe meta tags (#8960)
* Dedupe meta tag in favor of custom tag defined in _app

* Add test

* Fix comments
2019-10-18 01:40:54 -04:00
Joe Haddad
c5caa89209
v9.1.2-canary.6 2019-10-17 11:56:33 -04:00
JJ Kasper
31b2f51a03 Don't mark page as nextExport if it's SPR (#9113)
* Don't mark page as nextExport if it's SPR

* Add test for fetching prerender data after mount
2019-10-17 11:52:13 -04:00
Joe Haddad
4374e7c5d2
v9.1.2-canary.5 2019-10-16 17:38:17 -04:00
JJ Kasper
a3eb73240c Update to return JSON if data request (#9106)
* Update to return json if data request

* Update sending data

* Add test using serverless bundle directly

* Don't early return if fromExport
2019-10-16 17:24:28 -04:00
Joe Haddad
117d02359f
v9.1.2-canary.4 2019-10-16 14:56:32 -04:00
Joe Haddad
393af8e6b3
Fix SPR header name (#9104) 2019-10-16 14:54:07 -04:00
Gerald Monaco
beed775e55 Update legacy _app context (#9083) 2019-10-16 11:39:49 +02:00
Alex Castle
0886a1234d Optimize script tags (#9048)
* Update _document.tsx to optimize script loading

* Update maxInitialChunks to 15

* Undo change chunk count

* Adjust impl a bit

* Add CSS preload test

* Ensure build manifest not preloaded

* Correct file name

* break comment
2019-10-16 00:01:10 -04:00
JJ Kasper
d3cbb163be Fix SPR always revalidating in production (#9091)
* Add failing tests for SPR

* Fix SPR always revalidating in production

* Remove extra changes
2019-10-15 22:00:50 -04:00
Joe Haddad
07502ba2dd
v9.1.2-canary.3 2019-10-15 16:38:30 -04:00
Joe Haddad
0208356f67
Temporary: SPR: Use Group Index Mapping (#9089)
This pull request is a temporary addition that uses the `x-now-route-params` header in serverless.

This header returns the regex groups with indexes, not their named variants.
As a result, we must use the getRouteMatcher utility to reverse this into Next.js' expected names.

Since this got complex, I've added a test for it. We should probably remove this behavior sooner than later.
2019-10-15 16:30:10 -04:00
Joe Haddad
c77338bd31
Temporary: Add Support for Now Platform Headers (#9085) 2019-10-15 14:44:50 -04:00
Alex Castle
3263af513e Update framework chunk test regex to not select nested dependencies (#9012)
* Update framework chunk test regex to not select nested dependencies

* Update webpack-config.ts
2019-10-14 14:02:11 -04:00
Gerald Monaco
b2adfde983 Remove _document context (#9068) 2019-10-14 12:45:56 -04:00