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

181 commits

Author SHA1 Message Date
Arunoda Susiripala 304225d9ea Optimize the bundle size of Next.js core (#2422)
* Try to the slim the webpack output.

* Remove react-hot-loader completely from production.
2017-07-01 12:54:16 +05:30
Andrei Pfeiffer 4c33c6b9fc lint: use const instead of let (#2270) 2017-06-25 12:45:45 +02:00
Arunoda Susiripala 8c6550c504 Fix a potential race condition in router when doing prefetching. (#2317) 2017-06-23 10:46:55 +05:30
Jess Telford 8017bd3774 More informative error for bad routes (#2300) 2017-06-20 21:43:38 +02:00
Arunoda Susiripala 8277d43190 Rewrite url when exporting only if there's a href. (#2316) 2017-06-20 14:07:36 +05:30
Henrik 7b8a4ea234 Create displayName util (#2286) 2017-06-19 18:33:02 +05:30
Arunoda Susiripala 9df59c1176 Dynamic component support with multiple modules (#2235)
* Layout ground works for next/async

* Implement the Dynamic Bundle feature.

* Add some test cases.

* Update README.

* Implement props aware dynamic bundle API.

* Update tests and README.

* Add a test case for React Context support.
2017-06-16 18:49:34 +05:30
Arunoda Susiripala 3898cb53b4 Make sure page-loader doesn't throw errors when registering. (#2282)
Even if it does it, we need to mark it as a page error.
2017-06-16 16:43:55 +05:30
Arunoda Susiripala a36be58124 Rewrite urls with hashes correct for static export. (#2242)
* Rewrite urls with hashes correct for static export.

* Fix some lint issues inside an example app.
2017-06-13 11:44:31 +05:30
Arunoda Susiripala 4726c4352e Scroll to the hash only if there's one after an error. (#2224) 2017-06-09 23:45:37 +02:00
Arunoda Susiripala 0d4e0e52f7 Implement the correct browser behavior for hash changes. (#2223) 2017-06-10 01:02:28 +05:30
Krisztian Puska 28b40a5d41 Update debug error colors (#2182)
* Update debug error colors

* Soften colors

* Color tweaks, use zeit red w white header
2017-06-10 00:20:58 +05:30
Guillermo Rauch 37be0ab765 filter for null *after* Children is called to make this work with some -compat pollyfills 2017-05-22 12:58:54 -07:00
Kye Hohenberger 4c52ea1f70 Add shallow support to Link (#2012) 2017-05-21 08:24:58 +05:30
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