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: transform file extension for .ts and .tsx assets inside block.json files #415

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

fabiankaegy
Copy link
Member

@fabiankaegy fabiankaegy commented Jul 9, 2024

Related Issue/RFC: #414

Description of the Change

Alternate Designs

Possible Drawbacks

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.
  • I have added a changeset to my PR. See CONTRIBUTING document for instructions

@fabiankaegy fabiankaegy self-assigned this Jul 9, 2024
Copy link

changeset-bot bot commented Jul 9, 2024

🦋 Changeset detected

Latest commit: 95aeb0f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
10up-toolkit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@fabiankaegy fabiankaegy changed the title Fix: transform file extension for .ts and .tsx assets inside block.json files Fix: transform file extension for .ts and .tsx assets inside block.json files Jul 9, 2024
…p/10up-toolkit into fix/support-ts-imports-in-block-json
Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. I don't see this takes care of the actual compilation process? It'd be good to have one block example on the project to demonstrate the full flow otherwise!

@fabiankaegy
Copy link
Member Author

@Antonio-Laguna any .ts / .tsx file that gets added as an entrypoint to webpack gets transpiled to just JS. So without this we had the issue that the file path we provide now is no longer correct in the dist block.json since it still references the TS file.

So this fix here really is only to make sure we also rename the entry after assets are already transpiled :)

@fabiankaegy fabiankaegy merged commit 75b890b into develop Sep 24, 2024
7 checks passed
@Antonio-Laguna
Copy link
Member

@fabiankaegy been a while since I've gone through this!! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants