Skip to content

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

Merged
slax57 merged 2 commits intomasterfrom
vite-source-maps-production
Jan 24, 2025
Merged

[Doc] Document how to have sourcemaps in production#10466
slax57 merged 2 commits intomasterfrom
vite-source-maps-production

Conversation

@djhi
Copy link
Contributor

@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

Development

Successfully merging this pull request may close these issues.

2 participants