Skip to content
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

[Doc] Document how to have sourcemaps in production #10466

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Jan 23, 2025

Problem

In production, even with sourcemaps enabled, only the ESM sources are loaded in the devtool.

Solution

  • Document how to enable sourcemaps with TS source files
  • Do it automatically in new create-react-admin apps

How To Test

  • make build-create-react-admin
  • ./node_modules/.bin/create-react-admin myadmin --data-provider ra-data-fakerest --auth-provider local-auth-provider --install npm
  • cd myadmin
  • npm run dev: verify that debugging react-admin files still happen in TS files
  • npm run build && npm run serve: verify that debugging react-admin files still happen in TS files

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@djhi djhi added the RFR Ready For Review label Jan 23, 2025
@slax57 slax57 self-requested a review January 24, 2025 13:43
@slax57 slax57 added this to the 5.5.1 milestone Jan 24, 2025
@slax57 slax57 merged commit 4dee04e into master Jan 24, 2025
16 checks passed
@slax57 slax57 deleted the vite-source-maps-production branch January 24, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants