* test(router-plugin): tests for the route-items being wrapped in React.memo
* fix(router-plugin): React.memo breaks the codesplitting
* test(router-plugin): snapshots for the React.memo stuff
* refactor(router-plugin): variable naming is hard 😅
* chore(router-plugin): whoops
* refactor(router-plugin): use the helpers
* fix(router-plugin): unnecessarily importing items that should be eliminated
* fix(router-plugin): update snapshots
* fix(router-plugin): same treatment for loaders
* test(router-plugin): update snapshots
* style(router-plugin): eslint
* refactor(router-plugin): use guard clauses
* perf(router-plugin): reduce the double traversals being done here
* test(router-plugin): starting point
* fix(router-plugin): fix default imported components
* test(router-plugin): test case for there being both a default component import and a destructured loader import
* chore(router-plugin): cleanup of my testing test file...
* feat: setup the starter for an rspack integration
* refactor(router-plugin): compose the plugins toghether
* feat(router-plugin): initial export for rspack
* docs(examples): add the quickstart-file-based pages in
* feat(router-plugin): generator should generate the route-tree on startup
* feat(examples): use the route-tree
* feat(router-plugin): router-generator working
* feat(router-plugin): rspack support only for the generator
* refactor(router-plugin): make the rspack exports a bit cleaner
* chore(router-plugin): jsdocs for the vite plugin
* docs(router-plugin): update with references and mentions to rspack/rsbuild
* style(router-plugin): eslint import ordering 😭
* perf(react-router): remove router context from every route apart from the root
From my understanding, TRouterContext is only relevant to the RootRoute and is not relevant to each route
* perf: remove TParentRoute from file route options, infer lazily from parent and fix merging of context in beforeLoad/loader
* tests: add type tests for root route merging of context and buildLocation
* tests: add more tests and cleanup
* Add test case for linking with from prop and a param containing slash
* Remove .only from test
* fix: encode pathname in match
* refactor: move encoded params to interpolatePath
---------
Co-authored-by: Jakob Norlin <jakob.stahl91@gmail.com>
Co-authored-by: chorobin <chrishorobin@hotmail.com>
* docs: update the file-based routing guide
* docs: update the quick-start guide
* docs: update the migrate from react-location guide
* docs: more updates to the migration from react-location guide
* docs: update the code-splitting guide
* docs: update the routing concepts guide
* docs: broken link on the code-splitting guide
* chore: this route-tree has not been generated
* chore: remove tests
* refactor(router-plugin): export configSchema
* refactor(start): use the exports from router-plugin
* refactor(router-vite-plugin): just a proxy doing exports
* fix(router-plugin): do not perform code-splitting unless perms are given
* fix(router-plugin): package.json fields causing issues during imports
* fix: make the inlineConfig optional
* chore: trigger ci
* chore: try ci again
* chore: add a better readme
* test: just something to trigger CI honestly
* feat: scaffold the new `@tanstack/router-plugin` package
* chore: include in the overrides
* feat: more scaffolding
* test: just a random test that'll be removed later
* build: hopefully fixes build
* style: import order
* chore: peer deps for router-plugin
* feat: setup the generator
* refactor: combined needs to be done for the individual plugin
* chore: copy all the babel stuff over from router-vite-plugin
* feat: copy the babel plugin setup from router-plugin
* feat: enfore pre
* refactor: turn the error into its own custom one
* style: eslint
* style: more eslint
* chore: update the readme
* refactor: remove start logic
* refactor: use `@tanstack/start-vite-plugin` in `@tanstack/start`
* chore: trigger ci
* chore: remove this
* try that again
* ...
* maybe
* interrupt
* chore: remove this
* copy the router-vite-plugin into start-vite-plugin
* test: remove the tests we dont need
* export config-name from generator
* undo that last one
* reduce this down
* eliminate the router logic
* undo the touches to the generator and cli
* move this down here
* eslint
* chore: remove deps that are not needed
* test: test for createServerFn being renamed during the destructured import
* fix: handle destructured rename case
* test: handle star imports
* chore: push
* chore: remove this
* fix: redirect with relative path
* tests(react-router): add test for redirect with `from` and fix existing test
* tests: add beforeLoad test with redirect with `from`
* tests: remove leading slashes
---------
Co-authored-by: chorobin <chrishorobin@hotmail.com>
Wrap identifiers/call expressions that are passed as the 2nd parameter
to createServerFn with a function expression whose body is prepended
with the "use server" directive.
This allows for functions that are passed to createServerFn to be
wrapped with other functions that server as middleware.
router-vite-plugin/tests/test-files/createServerFn.tsx has a Zod
middleware function example which has the "use server" directive
properly prepended.