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

167 commits

Author SHA1 Message Date
Arunoda Susiripala 4d0147385c Merge v3-beta in dynamic-imports 2017-05-15 09:41:42 +05:30
Arunoda Susiripala e78c2f44dc Introduce proper url routing for next-export which supports query strings. 2017-05-14 06:10:32 +05:30
Arunoda Susiripala 90991f176c Add <page>/index.html url re-writes to next/router. 2017-05-14 05:55:57 +05:30
Arunoda Susiripala b18ecc925b Implement client side routing as they should work.
Basicaly, now client side routing as they work like
in Next.js including prefetching.
2017-05-11 08:24:27 -07:00
Arunoda Susiripala 98ed666ca6 merge master into next-export 2017-05-10 19:01:01 -07:00
Arunoda Susiripala 450277f294 Make sure next export doesn't break other modes. 2017-05-09 00:42:48 -07:00
Arunoda Susiripala 147a5ce641 Fix server rendering issue for normal apps. 2017-05-08 23:42:37 -07:00
Arunoda Susiripala 311e4ca0ee Make sure the router is aware of the nextExport
Based on the we can change the routing to do SSR always.
Also make sure pageLoader don't download the page via
client side twice.
2017-05-08 18:20:50 -07:00
Arunoda Susiripala 0edee47d07 Fix the page-loader-normalization issue on '/index' page. (#1882) 2017-05-04 13:05:47 -07:00
Arunoda Susiripala 24f3f143a6 Introduce "asPath" into router and getInitialProps (#1857)
* Add asPath to next/router and getInitialProps context.

* Add test cases.

* Update docs.

* Build as-path pages before they use.
2017-05-03 09:40:09 -07:00
Arunoda Susiripala f578089d05 Fix page loader page normalization issue (#1844)
* Add integration tests for nested componentDidMount

* Fix the page loader normalization issue.

* Fix a typo in the url.
2017-05-01 16:26:18 -07:00
Arunoda Susiripala d4e047839c Make sure to run the promise logic if only called .then() 2017-04-27 17:12:20 -07:00
Arunoda Susiripala fc34484e5e Fix a typo. 2017-04-27 13:07:01 -07:00
Arunoda Susiripala 93da57e1f6 Set a proper displayName for the wrapper dynamic component. 2017-04-27 09:05:18 -07:00
Arunoda Susiripala 686dd4c4dd Merge master into dynamic-import. 2017-04-27 08:48:43 -07:00
Kuan fb0b7534d7 Update isLocal logic to enforce protocol and port (#1737) 2017-04-22 15:07:36 +02:00
Arunoda Susiripala 17329edcc9 Handle require.ensure errors well.
Introduce a new Promise library which runs on the same eventloop.
2017-04-19 23:55:06 +05:30
Arunoda Susiripala b5a03a3896 Implement ssr=false support. 2017-04-18 22:21:31 +05:30
Arunoda Susiripala f2bfcd01b0 Add an example with custom loading component. 2017-04-18 22:07:57 +05:30
Arunoda Susiripala 90ea471aa7 Merge master into dynamic-import. 2017-04-18 21:42:21 +05:30
Arunoda Susiripala dec85fe6c4 Add CDN support with assetPrefix (#1700)
* Introduce script tag based page loading system.

* Call ensurePage only in the dev mode.

* Implement router using the page-loader.

* Fix a typo and remove unwanted code.

* Fix some issues related to rendering.

* Fix production tests.

* Fix ondemand test cases.

* Fix unit tests.

* Get rid of eval completely.

* Remove all the inline code.

* Remove the json-pages plugin.

* Rename NEXT_PAGE_LOADER into __NEXT_PAGE_LOADER__

* Rename NEXT_LOADED_PAGES into __NEXT_LOADED_PAGES__

* Remove some unwanted code.

* Load everything async.

* Remove lib/eval-script.js
We no longer need it.

* Move webpack idle wait code to the page-loader.
Because that's the place to do it.

* Remove pageNotFound key from the error.

* Remove unused error field 'buildError'

* Add much better logic to normalize routes.

* Get rid of mitt.

* Introduce a better way to register pages.

* Came back to the mitt() based page-loader.

* Add link rel=preload support.

* Add assetPrefix support to add support for CDNs.

* Add assetPrefix support for preload links.

* Update readme.md
2017-04-17 21:18:43 -07:00
Arunoda Susiripala dfa28815a5 Add server side rendering for dynamic imports. 2017-04-18 01:45:50 +05:30
Arunoda Susiripala 6e0e7b4d5a Came back to the mitt() based page-loader. 2017-04-11 22:07:59 +05:30
Arunoda Susiripala 7997c1fd3c Introduce a better way to register pages. 2017-04-11 20:03:18 +05:30
Arunoda Susiripala fb2f90bec1 Get rid of mitt. 2017-04-11 15:35:29 +05:30
Arunoda Susiripala c077ebe7ba Add much better logic to normalize routes. 2017-04-11 15:12:22 +05:30
Arunoda Susiripala 6f9b51fce6 Remove pageNotFound key from the error. 2017-04-11 14:51:28 +05:30
C. T. Lin 8e6615dcf9 upgrade react to v15.5 and use prop-types instead of React.PropTypes (#1684)
* upgrade react to v15.5 and use prop-types instead of React.PropTypes

* Update package.json
2017-04-11 00:05:26 +05:30
Arunoda Susiripala 0b8a14f35c Use existing route info when Router.reload() is called. (#1654)
Earlier, it tries to get that info from the location.href.
That's incorrect.
2017-04-07 09:52:41 -07:00
Arunoda Susiripala 4f26e84ff2 Move webpack idle wait code to the page-loader.
Because that's the place to do it.
2017-04-06 12:19:00 +05:30
Arunoda Susiripala 751d2e9853 Remove lib/eval-script.js
We no longer need it.
2017-04-06 11:42:36 +05:30
Arunoda Susiripala 822a99b0d5 Get rid of eval completely. 2017-04-05 12:15:39 +05:30
Arunoda Susiripala 03209d88fd Fix some issues related to rendering. 2017-04-05 02:38:38 +05:30
Arunoda Susiripala c95d2b28d0 Implement router using the page-loader. 2017-04-05 01:25:56 +05:30
Arunoda Susiripala a0945c7800 Introduce script tag based page loading system. 2017-04-03 23:40:24 +05:30
Arunoda Susiripala 5fcb49632e Introduce better debug error handling (#1592)
* Introduce better debug error handling
With this we are rendering runtime and debug errors inside
a it's own error root.
That gives us better error handling and control.
Also, now we are patching React core to capture runtime errors.

* Render the initial error on the server.
2017-04-01 14:03:40 -07:00
Arunoda Susiripala 87ff667e6e Revert "Introduce better debug error handling (#1590)" (#1591)
This reverts commit 0bdd321654.
2017-04-01 13:23:09 -07:00
Arunoda Susiripala 0bdd321654 Introduce better debug error handling (#1590)
With this we are rendering runtime and debug errors inside
a it's own error root.
That gives us better error handling and control.
Also, now we are patching React core to capture runtime errors.
2017-04-01 13:09:16 -07:00
Arunoda Susiripala 4a069e9d93 Remove Service Worker unregister code. (#1568)
We don't need to do it now. Because, any running service workers
might have stopped by now.
2017-03-30 16:18:15 +02:00
Arunoda Susiripala d32e69eeb9 Get rid of res.clone() (#1567)
Usually res.clone() should work. But it's not working with
the laster Safari (10.1)
We need to use a method we do not clone
2017-03-30 16:09:31 +02:00
я котик пур-пур aa4105e001 Add the system-ui font family (#1555) 2017-03-29 11:55:26 -03:00
Tim Neutkens 769cb49c30 Fix serviceworker call on http (#1542) 2017-03-28 21:23:38 +02:00
Arunoda Susiripala fb1e828318 Wait until webpack updates before eval the JSON page. (#1511) 2017-03-26 13:38:55 -07:00
Arunoda Susiripala 97c472c0c8 Handle pages with no default export and show an error. (#1484)
That error is meaningful and easy to find the issue.
2017-03-23 09:40:22 +05:30
Arunoda Susiripala bc2d5f3bdb Show errored file always in the error overlay. (#1470)
This was not happening when there's module not found errors.
Now we try to do this for all the errors if possible.
2017-03-23 04:43:23 +05:30
Tim Neutkens 228bbbef74 Use jsonPageRes instead of xhr (#1424) 2017-03-15 08:07:29 +05:30
Dan Zajdband d92ab55d22 Add/link replace (#1419)
* Using developit/unfetch as the Fetch API polyfill

* Added the replace prop into the Link component

* Added integration test for replace prop on Link component
2017-03-14 18:06:34 -05:00
Arunoda Susiripala 57099a544c Use mitt instead of EventEmitter. (#1398)
EventEmitter is quite bit and mitt is a pretty good/small replacement.
2017-03-13 10:04:30 +05:30
Sergio Daniel Xalambrí 38822717a9 Add support for URL objects in Link and Router (#1345)
* Add support for URL objects in Link and Router

* Fix typo in comment

* Fix possible bug if the `href` prop is `null`

* Document the usage of URL objects in Link and Router

* Update readme.md

* Parse URL to get the host & hostname in `isLocal`

This should check if the current location and the checked URL have the same `host` or `hostname`.

* Format `as` parameter from object to string if required

* Format `href` and `as` inside the construct and componentWillReceiveProps

* Use `JSON.stringify` to compare objects

* Add usage example

* chore(package): update chromedriver to version 2.28.0 (#1386)

https://greenkeeper.io/

* Refactor the codebase a bit.

* Change the example name.

* Add a few test cases.

* Add the example to the README.
2017-03-12 09:27:51 +05:30
Arunoda Susiripala 6db7101c40 Add beforeHistoryChange router event. (#1360) 2017-03-08 08:30:47 -08:00