Commit graph

3793 commits

Author SHA1 Message Date
Joe Haddad
e7110a0347
Asynchronously check for type errors (#7668)
* Asynchronously check for type errors

* Add TODO

* Fix webpack invalidation

* Show TypeScript error in dev client
2019-06-26 14:54:23 -04:00
Eduardo P. Rivero
2259a7ec1f Updating hapijs package name (#7664)
* Updating hapijs package name

Hapi was moved to a new module under the name @hapijs/hapi.

Right now installing just as hapi is giving you this warning:

```bash
npm WARN deprecated hapi@18.1.0: This module has moved and is now available at @hapi/hapi. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
```
This change does not affect the integration with next and it continues to work great.

* Update package.json
2019-06-26 09:40:35 +02:00
JJ Kasper
bf04031f9d
v8.1.1-canary.60 2019-06-25 20:53:06 -07:00
JJ Kasper
f9491887fc
Fix maxConcurrentCalls used instead of maxConcurrentWorkers (#7672) 2019-06-25 20:51:40 -07:00
JJ Kasper
ba373d8707
v8.1.1-canary.59 2019-06-25 20:09:20 -07:00
JJ Kasper
9781510839
Parallelize requiring pages for static check (#7671) 2019-06-25 19:54:28 -07:00
JJ Kasper
c773dae48a
v8.1.1-canary.58 2019-06-25 15:57:57 -07:00
JJ Kasper
6a2e8cd81f
Fix memory leak from requiring pages (#7659) 2019-06-25 13:36:21 -07:00
Joe Haddad
19f3c4d77c
Unflag Dynamic Routing (#7663) 2019-06-25 10:28:48 -04:00
JJ Kasper
5a1b32dcf1
v8.1.1-canary.57 2019-06-24 18:12:22 -07:00
JJ Kasper
8c9819200b
Fix missing .test(path) in webpack-config (#7655) 2019-06-24 18:05:15 -07:00
JJ Kasper
9e22f06664
v8.1.1-canary.56 2019-06-24 16:45:18 -07:00
JJ Kasper
e360c105ab
Update prefetch check to prevent re-prefetching (#7654)
* Update page-loader prefetch checking

* Add test for re-prefetching same bundle
2019-06-24 16:13:33 -07:00
Joe Haddad
c03e94bebd
Remove usage of process.browser (#7651) 2019-06-24 16:34:10 -04:00
Joe Haddad
ee2bdb896c
Avoid lambda nomenclature when target != 'serverless' (#7650) 2019-06-24 14:59:51 -04:00
Joe Haddad
353e505172
Fix TypeScript typings (#7648)
* Fix TypeScript typing
This correctly defines `process.browser` instead of `process.env.browser`.

It also removes `process.crossOrigin` because it's not found in our documentation anywhere and is mostly used for internal purposes.

* Make sure `process.browser` doesn't throw a type error

* Split globals from Next.js module

* Allow `test` as a valid NODE_ENV

* Fix type assignment

* Make sure global types get published

* Fix test
2019-06-24 14:26:17 -04:00
Kuba Juszczyk
2debe7fb73 Allow opting out of automatic prefetch for Link (#7532)
* Restoring not working mouse event

* Restoring possibility of conditionally switching off the prefetch
2019-06-24 11:22:27 -07:00
Joe Haddad
0af9d849d3
Compile dependencies for IE11 (#7646)
This PR compiles development-time dependencies that cause invalid syntax errors in IE 11 (ES 5).

Closes #7610
Closes #7612
2019-06-24 11:45:36 -04:00
Joe Haddad
8ddb4a6a95
_document middleware is experimental (#7647)
* `_document` middleware is experimental

Closes https://github.com/zeit/next.js/issues/7580

* Turn on document middleware
2019-06-24 11:31:27 -04:00
Joe Haddad
31b3106a32
Revert "ncc Webpack build redux (#7628)"
This reverts commit e85a517e1a.
2019-06-24 09:48:26 -04:00
Khang Hoang
a30870bd37 Fix typo in with-redux-reselect-recompose example (#7642) 2019-06-23 16:02:20 -07:00
Luis Fernando Alvarez D
9455a8b242 Update example: with redux reselect recompose (#7624)
* Removed eslint packages and module-resolver from the example

* Removed unused package
2019-06-22 10:24:06 -07:00
JJ Kasper
516325eafc
v8.1.1-canary.55 2019-06-21 11:17:26 -07:00
Guy Bedford
e85a517e1a ncc Webpack build redux (#7628)
* Reimplement ncc webpack build

This reverts commit 6feca310d7.

* Shared webpack build

* ncc workaround pending @zeit/ncc#437

* update ncc

* build tweaks, fixup autodll-import

* possible Node 8 fix

* second possible Node 8 fix

* and update taskfile
2019-06-21 12:28:41 -04:00
Lukáš Huvar
ff040950eb Fixes serverless target in development (#7619) 2019-06-20 19:47:45 -07:00
March Works
7678ee2f2e set __next-build-watcher width and height to 0 (#7618) 2019-06-20 17:11:15 -07:00
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