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

fix(build): remove jsx pragma comments from build output #5112

Merged
merged 1 commit into from Sep 21, 2022

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Sep 21, 2022

Summary

Removes @jsx h comments from the built outputs.

Result

fixes algolia/react-instantsearch#3632

These comments aren't needed, as the jsx is already transpiled, and it can cause issues when someone uses the automatic runtime option, which doesn't allow jsx pragmas

fixed in two places

  • umd / cjs / esm --> babel config
  • .d.ts --> postprocessing script of the tsc

How to test

Compare the build of before and after this PR, and check whether the only thing which disappeared is the /** @jsx h */, and that there are no other instances of the pragma (written differently maybe)

fixes algolia/react-instantsearch#3632

These comments aren't needed, as the jsx is already transpiled, and it can cause issues when someone uses the automatic runtime option, which doesn't allow jsx pragmas

fixed in two places
- umd / cjs / esm --> babel config
- .d.ts --> postprocessing script of the tsc
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 718563d:

Sandbox Source
InstantSearch.js Configuration

@Haroenv Haroenv merged commit 6582083 into master Sep 21, 2022
@Haroenv Haroenv deleted the fix/remove-jsx-comment branch September 21, 2022 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pragma and pragmaFrag cannot be set when runtime is automatic.
2 participants