In certain cases the handler.js copy resulted in duplicate code in the
final project build. As example in the final build, dynamically imported
modules might import their dependencies from the original entry-server.js
instead of the handler.js copy, this would result in the following chain:
1. handler.js copied from entry-server.js (therefore has code of dep1,
dep2, dep3)
2. handler.js dynamically imports
SomeComponent.js
2. SomeComponent.js doesnt know about handler.js, imports dep2 from entry-server.js
3. entry-server.js has code for dep1, dep2, dep3
4. The final build includes dep1, dep2 and dep3 from handler.js and from
entry-server.js
So by removing the handler.js copy and directly importing
entry-server.js we can avoid the duplicate dependency code.
* type path-utils
* convert fileRoutesImport to ts
* add @types/babel-types
* add types to fileRoutesImport
* use @babel/types directly
* add @babel/types as dependency
* convert manifest to ts
* add some types to manifest
* rename router.js to .ts
* convert router.js to .ts
* Revert "rename router.js to .ts"
This reverts commit 38049e1a4b74dc8e00540124dac98ce26162347d.
* Revert "add some types to manifest"
This reverts commit 9e44f91b8ac031b19f30a217349cde8dff6b91f2.
* Revert "convert manifest to ts"
This reverts commit 23ce4a323a66782ea8012f487b6ffc0eb63cd6b1.
* ts-ignore @babel/types
* revert router.js
---------
Co-authored-by: Ryan Carniato <ryansolid@gmail.com>
* Append http headers instead of overwrite
* Set by default, append if prop set
---------
Co-authored-by: Nikhil Saraf <nsaraf98@gmail.com>
Co-authored-by: Ryan Carniato <ryansolid@gmail.com>
* feat: call handleRefetch() when the response doesn't have a status that indicates a redirect
* fix: remove validations to call handleRefetch() method
---------
Co-authored-by: Ryan Carniato <ryansolid@gmail.com>