Commit graph

3867 commits

Author SHA1 Message Date
Joe Haddad
6c625703ed
Dynamic Routes: Change impl from $param to [param] (#7623)
* Dynamic Routes: Change impl from $param to [param]

* Update expected test snapshot

* Update test to use new syntax

* Update test file

* Test more behavior

* Update route sorter for new param syntax

* Update dynamic routing tests

* Update danging test file

* Tweak test

* Fix dev and update tests
2019-06-20 18:27:04 -04:00
Joe Haddad
eddc852de3
Extract isDynamicRoute helper (#7622) 2019-06-20 14:41:02 -04:00
Ting-Hsiang Hsu
bd6e971051 (example/with-react-relay-network-modern) Fix example (#7590) 2019-06-19 12:38:28 -05:00
Joe Haddad
204e5a7171
v8.1.1-canary.54 2019-06-19 13:28:43 -04:00
Joe Haddad
b8a7cd8c0f
Exit process after build (#7614) 2019-06-19 13:28:18 -04:00
JJ Kasper
c39c5d264e Add error handling for _error page (#7608) 2019-06-19 12:26:22 -04:00
Joe Haddad
69150043e4
typeof window is object on the client (#7606) 2019-06-18 22:22:32 -04:00
Joe Haddad
50b5334a70
typeof window will always be undefined on the server (#7605)
This should allow Terser to tree shake code branches.
2019-06-18 20:59:30 -04:00
Joe Haddad
3047e45396
Correctly define NODE_ENV and process.browser (#7604)
* Correctly define NODE_ENV and `process.browser`

* Add crossOrigin property
2019-06-18 20:58:22 -04:00
Joe Haddad
0c8f97b9d6
Ensure Node types are installed (for process types) (#7603) 2019-06-18 19:57:49 -04:00
Maksym Popenko
ca8156b057 (examples/with-immutable-redux-wrapper) Fix README.md (#7597)
Fix typo
2019-06-18 16:21:36 -07:00
JJ Kasper
1cad7e8e6a
v8.1.1-canary.53 2019-06-18 14:24:35 -07:00
Joe Haddad
fb73ef7d75
Add next/dynamic test (#7600) 2019-06-18 16:52:02 -04:00
Joe Haddad
033dd5ed08
Re-require all module information for client-side initializers list (#7571)
* Re-require all module information for client-side initializers list
We really should re-work how our loadable code words, because this passes an excessive number of modules to the client.

In the ideal world, we only pass the entry module id of each chunk, but there's no point in investing the time until we switch to webpack 5 which completely revamps the chunk graph API.

* Get a unique set of ids
2019-06-18 16:27:31 -04:00
jsmirandaiii
5f269d7c88 Added nodemon config to watch for .ts and .js files in the server folder (#7592) 2019-06-17 16:36:13 -05:00
Luis Fernando Alvarez D
a71cb644b5 Improve docs (#7564)
* Update getInitialprops docs

* Update docs for prefetch

* Updated prefetch docs

* Removed hotSelfAccept from docs and othr changes

* Prefer /public

* dots dots dots dots

* Added docs for Automatic Pre-rendering

* Added a note to <Link />

* Removed 404 example

* Added references for Automatic pre-rendering

* Added a typescript section for AMP

* Executed doctoc again to add AMP sections

* Properly explain automatic pre-rendering

* Switch back to LF

* Apply corrections

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

* Minor corrections

* Added back some periods

* Added back some periods
2019-06-14 11:48:57 -07:00
JJ Kasper
090a06bb2c
Add handling for invalid pages during autoExport (#7574)
* Add handling for invalid pages during autoExport

* Add err.sh link for invalid page export

* Fix typo

* Apply suggestions from code review

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>
2019-06-13 17:08:19 -07:00
JJ Kasper
feb31f4de7
v8.1.1-canary.52 2019-06-13 11:35:23 -07:00
Juan Olvera
cb22d3671f Added new blog example (#7511) 2019-06-13 10:32:04 -05:00
JJ Kasper
fbc20a5401 Strip queries before matching route on client (#7566) 2019-06-13 09:35:47 -04:00
Joe Haddad
7132995a0d
v8.1.1-canary.51 2019-06-11 13:59:09 -04:00
Joe Haddad
92ae28b843
Tune default Terser configuration (#7554)
This adjusts our default terser configuration to not break seemingly valid JavaScript code.

Closes #7178
Closes #7496
2019-06-11 13:34:45 -04:00
Joe Haddad
5e66656d21
Mark whether page is a lambda or static file in build output (#7553) 2019-06-10 14:59:36 -04:00
Joe Haddad
ef903a25ce
Add static page marker to page info (#7552) 2019-06-10 14:46:30 -04:00
Joe Haddad
3b66fd3be5
Remove invalid meta type (#7549) 2019-06-10 12:41:43 -04:00
Joe Haddad
d1b7b82922
v8.1.1-canary.50 2019-06-10 12:30:00 -04:00
Joe Haddad
8e3c5c2be0
Improve TypeScript package install experience (#7548)
This change will prompt the user about missing packages using the same DX instead of two separate code paths.
2019-06-10 10:53:35 -04:00
Lukáš Huvar
5a014bdf75 Adding TypeScript description to next export (#7547)
* Adding Typescript description to next fixes #7529

* Change default export

* Improve typing for next

* Remove dev server typings
2019-06-10 10:20:39 -04:00
Joe Haddad
ac5a1c62de
Don't confuse the user with an eagerly created tsconfig.json (#7546)
* Don't confuse the user with an eagerly created `tsconfig.json`

* Fix errors

* Extra log

* Bail when doing nothing
2019-06-10 09:02:16 -04:00
Joe Haddad
ffba702608
Create file referencing Next.js types (#7545) 2019-06-10 07:25:31 -04:00
Allen
3d3855093a Fix sentence in with-context-api example (#7542) 2019-06-09 21:46:03 -07:00
JJ Kasper
4b27507be2
v8.1.1-canary.49 2019-06-09 17:21:41 -07:00
JJ Kasper
cb29085707
Fix next start in serverless mode with public directory (#7541)
* Fix next start in serverless mode with public directory

* Add public folder to serverless test suite
2019-06-09 17:18:38 -07:00
JJ Kasper
fa45fa0a60
Add export const config support and make withAmp a no-op (#7525)
* Add export const config support and make withAmp a no-op

* Use babel plugin for PageConfig

* Fix serverless-loader exports

* Add backwards compatibility for withAmp
2019-06-09 17:16:14 -07:00
Tim Neutkens
a4d6d86dc9 v8.1.1-canary.48 2019-06-09 14:17:09 -07:00
Luis Fernando Alvarez D
af89040622 Add Typescript to next-mdx readme (#7540)
I added a link to the MDX docs because to enable Typescript we do exactly the same.
2019-06-09 12:34:42 -07:00
Dmytro
56e740168d TS: don't set page component props to the App's props by default (#7535) 2019-06-08 13:41:50 -05:00
Faris Abusada
890a45616d fixes constants link in readme (#7534) 2019-06-08 17:35:02 +02:00
Kévin Dunglas
3f8dd6b665 with-cookie-auth: don't rely on the Host header (#7435)
* with-cookie-auth: don't rely on the Host header
2019-06-07 13:18:41 -05:00
Kuba Juszczyk
e49f26d644 Restore onMouseEnter event (#7531) 2019-06-07 11:43:27 -04:00
Joe Haddad
a372edae48 Default target in loadConfig instead of next build (#7521)
* Default `target` in `loadConfig` instead of `next build`
We should set the target from the environment variable during `loadConfig` instead of in `next build`. This ensures all other locations in Next.js that rely on `config` can read the correct value to toggle behaviors.

* Use object destructuring

* Add tests for builder target

* Run start with serverless
2019-06-06 15:57:42 +02:00
Tim Neutkens
a3082d672e v8.1.1-canary.47 2019-06-06 15:44:28 +02:00
Tim Neutkens
6c5a573352
Add types for <Html> and <Head> element (#7524)
* Clean up _document documentation

* Add types for `<Html>` and `<Head>` element
2019-06-06 15:41:31 +02:00
Joe Haddad
86d62afaf9
Adjust Flying Shuttle message (#7522)
* Adjust Flying Shuttle message
This adjusts the flying shuttle message for when a shuttle is not found or cannot be reused to reduce confusion to the user opting into the feature.

* Tweak message
2019-06-06 09:19:08 -04:00
Tim Neutkens
e49e442796
Clean up _document documentation (#7523) 2019-06-06 15:09:20 +02:00
Luc
3b5f18495b Replace recursive-copy with own implementation (#7263)
* replace recursive-copy with own implementation

* update yarn.lock

* do not filter out not directories

* do not fail if folder already exists

* replace `\` by `/` when sending pathes to filter

* use fs-extra only in tests

* investigate and test recursive-copy npm module

* improve test by creating fixtures programmatically

* remove recursive-copy npm module test

* add recursive-copy to bench

* add bench:recursive-copy script

* fix Sema import in recursive-copy.ts

* small improvements
2019-06-06 12:33:11 +02:00
JJ Kasper
e3cd31df17
v8.1.1-canary.46 2019-06-05 20:11:06 -07:00
JJ Kasper
be02b881c5
Fix auto export in serverless (#7517)
* Fix nextExport not being set in serverless

* Add test for refreshing query
2019-06-05 19:37:58 -07:00
JJ Kasper
66fd87fc9b
v8.1.1-canary.45 2019-06-05 13:26:13 -07:00
JJ Kasper
2bb2b57395
Fix autoExport on windows and add tests (#7514) 2019-06-05 13:20:08 -07:00