10up / 10up-toolkit

Official 10up asset building toolkit.
114 stars 19 forks source link

Fix: transform file extension for `.ts` and `.tsx` assets inside `block.json` files #415

Closed fabiankaegy closed 2 months ago

fabiankaegy commented 4 months ago

Related Issue/RFC: #414

Description of the Change

Alternate Designs

Possible Drawbacks

Verification Process

Checklist:

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 95aeb0f4cbbd713cda5c1230c5293a7773dc2866

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 commented 2 months ago

@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 :)

Antonio-Laguna commented 2 months ago

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