-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor create-react-admin
and support ra-supabase
#10511
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slax57
requested changes
Feb 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also found some issues while testing
-
instructions in the generated Readme only mention npm and yarn
-
creating an app with pnpm throws errors at runtime
✘ [ERROR] Could not read from file: /home/slax57/workspaces/remove-me/node_modules/ra-ui-materialui/src
node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/react-admin/src/index.ts:4:14:
4 │ export * from 'ra-ui-materialui';
I believe it comes from the Vite config.
- creating an app with supabase (and npm) throws error at runtime
You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
I believe duplicate comes from ra-supabase-ui-materialui
- Installing an app with bun or pnpm still says
Start the app in development mode by running yarn dev.
(yarn)
slax57
approved these changes
Feb 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The interactive mode forces us to document the choices to select, which makes tutorials a bit harder to follow. The recent introduction of the
--basic
flag only addresses one particular case.We also want to promote
ra-supabase
.TODO
Solution
Make the interactive mode optional. By default, create-react-admin will create an empty react-admin app (no data provider, no auth provider, no resource, npm)
Users who want to use interactive mode must specify it:
Users who want to override one option can do so in the command line
Remove the
--basic
option, which is now uselessAdd support for provider shortcuts (
fakerest
->ra-data-fakerest
, etc)Add support for more package managers (
bun
andpnpm
)Add support for
ra-supabase
How To Test
make build-create-react-admin install
It's difficult, even impossible for yarn, to test the detection of the package manager used to run the command:
bun run ./node_modules/.bin/create-react-admin
should usebun
as the installer (a bun lock file will be generated)npm run ./node_modules/.bin/create-react-admin
should usenpm
as the installer (a npm lock file will be generated)Additional Checks
master
for a bugfix, ornext
for a feature