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

Add support for defining .ts entry points through block.json assets #414

Open
fabiankaegy opened this issue Jul 9, 2024 · 0 comments
Open
Labels
Good First Issue Good for newcomers Help Wanted Extra attention is needed JS TS

Comments

@fabiankaegy
Copy link
Member

For working with blocks we handle all the asset registration though the block.json file and it's script,viewScript, viewScriptModule, editorScript, and scriptModule keys.

These keys support relative file: imports which then get registered as webpack entrypoints.

The problem is that the block.json file just gets copied into the dist directory without getting transformed. So if the import is a .ts file that gets transpiled by webpack into a .js file the import would fail.

We should add a string transform for .ts/tsx to .js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers Help Wanted Extra attention is needed JS TS
Projects
None yet
Development

No branches or pull requests

1 participant